Agent-readable docs index: /docs/llms.txt. Full docs in one file: /docs/llms-full.txt. Download /docs/docs.zip to grep all markdown files locally.

Create an API key

/v1/keysPOST
The secret is returned once. A key can only grant scopes it holds, and a project-bound key can only create keys for its own project. Needs an admin key.
Authorization
bearer *Bearer <token>
API key of the form kaibo_<id>.<secret>. Scopes: read, write, read_write, forget, admin.
Request Bodyapplication/jsonrequired
label *string
Min length: 1Max length: 80
scopes *"read" | "write" | "read_write" | "forget" | "admin"[]
Min items: 1
projectId?string
Min length: 1Max length: 128
expiresAt?string (date-time)
Response
201 · Success
id *string
prefix *string
Pattern: ^kaibo_[A-Za-z0-9_-]{8}$
last4 *string
Min length: 4Max length: 4
label *string
scopes *"read" | "write" | "read_write" | "forget" | "admin"[]
projectId *stringnull
createdAt *string (date-time)
expiresAt *string (date-time) | null
lastUsedAt *string (date-time) | null
revokedAt *string (date-time) | null
key *string
Pattern: ^kaibo_([A-Za-z0-9_-]{8})\.([A-Za-z0-9_-]{32})$
400 · Invalid request
error *object
Show properties
code *"unauthenticated" | "forbidden" | "not_found" | "invalid_request" | "conflict" | "idempotency_mismatch" | "payload_too_large" | "rate_limited" | "internal"
message *string
requestId *string
details?object
401 · Missing, malformed, revoked or expired key
error *object
Show properties
code *"unauthenticated" | "forbidden" | "not_found" | "invalid_request" | "conflict" | "idempotency_mismatch" | "payload_too_large" | "rate_limited" | "internal"
message *string
requestId *string
details?object
403 · The key lacks the required scope
error *object
Show properties
code *"unauthenticated" | "forbidden" | "not_found" | "invalid_request" | "conflict" | "idempotency_mismatch" | "payload_too_large" | "rate_limited" | "internal"
message *string
requestId *string
details?object
429 · Rate limited. See Retry-After
error *object
Show properties
code *"unauthenticated" | "forbidden" | "not_found" | "invalid_request" | "conflict" | "idempotency_mismatch" | "payload_too_large" | "rate_limited" | "internal"
message *string
requestId *string
details?object
Request example
curl -X POST "/v1/keys" \ -H "Authorization: Bearer <token>" \ -H "Content-Type: application/json" \ -d '{ "label": "string", "scopes": [ "read" ], "projectId": "string", "expiresAt": "2024-01-15T09:30:00Z" }'