Skip to content

API Keys

LiberClaw provides two types of API keys for programmatic access: per-agent API keys for direct agent communication, and management API keys for the LiberClaw API itself.

Per-agent API keys let you call an agent’s chat endpoint directly, bypassing the LiberClaw web interface. This is useful for integrating agents into your own applications.

  1. Navigate to your agent’s detail page
  2. Scroll to the API Access section (visible only for running agents)
  3. Click Create API Key
  4. Copy the key immediately — it is shown only once and cannot be retrieved later

The key is displayed in a highlighted banner with a copy button. Click Done to dismiss the banner.

Send requests directly to the agent’s chat endpoint with the key in the Authorization header:

Terminal window
curl -X POST https://api.liberclaw.ai/api/v1/chat/{agent_id} \
-H "Authorization: Bearer {your_api_key}" \
-H "Content-Type: application/json" \
-d '{"message": "Hello!", "chat_id": "my-session"}'

The response is an SSE stream with the same event format as the web chat interface.

The API Access section on the agent detail page lists all active keys, showing:

  • Key prefix (first few characters)
  • Label
  • Creation time

Click the delete icon next to a key to revoke it immediately.

Management API keys provide full access to the LiberClaw API on your behalf. They can be used to manage agents, send chat messages, and access all API endpoints that your account has access to.

  1. Go to the Settings / Account Overview page
  2. Scroll to the API Keys section
  3. Click Create Management Key
  4. Copy the key immediately — it is shown only once

Include the key in the Authorization header for any LiberClaw API request:

Terminal window
curl https://api.liberclaw.ai/api/v1/agents \
-H "Authorization: Bearer {your_management_key}"

The API Keys section on the Settings page lists all management keys with:

  • Key prefix
  • Label
  • Last used time
  • Creation date

Click the delete icon to revoke a key. A confirmation dialog appears before deletion.

  • API keys are shown in full only at creation time and cannot be retrieved afterward
  • Keys are stored as hashed values in the database
  • Revoking a key takes effect immediately
  • If you suspect a key has been compromised, delete it and create a new one