Skip to content
Product Docs

API Keys

List Api Keys
GET/api/v1/beta/api-keys
Create Api Key
POST/api/v1/beta/api-keys
Delete Api Key
DELETE/api/v1/beta/api-keys/{api_key_id}
ModelsExpand Collapse
APIKey object { id, redacted_api_key, user_id, 8 more }

Schema for an API Key.

id: string

Unique identifier

formatuuid
redacted_api_key: string

The key with its middle masked, except on the create response, which returns the full secret once and never again.

user_id: string
created_at: optional string

Creation datetime

formatdate-time
expires_at: optional string

When the API key expires. Null if the key never expires.

formatdate-time
key_type: optional "agent" or "user"
One of the following:
"agent"
"user"
metadata: optional map[unknown]
name: optional string
project_id: optional string
role: optional "admin" or "agent_viewer" or "viewer" or "viewer_v2"

Role capping what this key may do. Null if the key authorizes as its owner.

One of the following:
"admin"
"agent_viewer"
"viewer"
"viewer_v2"
updated_at: optional string

Update datetime

formatdate-time
APIKeyDeleteResponse object { cache_ttl_seconds, success }

Confirmation that a resource was deleted.

cache_ttl_seconds: number

Maximum seconds until cached information expires

minimum0
success: boolean

Whether the resource was deleted