Skip to content

API Keys & Authentication

← API Reference · 简体中文

Two Key Types

The open API uses two key levels, both starting with ext-:

Key typeBound toEndpointsCount
Resource-levelA single character / knowledge base / workflowThat resource's endpointOne per resource; regenerating overwrites the old key
User-levelYour accountDraw (draw), MCPOne per type

Resource-level keys already carry the resource identity: do not (and cannot) pass a resource ID — the server resolves it from the key.

Obtaining a Key

Fully self-service in the user web:

ResourceEntry
CharacterChat top bar More → API
Knowledge baseKB Q&A page More → API; the API action in My knowledge bases
WorkflowApp page top bar More → API
DrawDraw page top bar More → API
MCPTools page top bar More → API

In the dialog you can generate / regenerate the key, view the mask (ext-a3f8****f6g7) and reveal the plaintext (returned only on generation or reveal — store it safely). Only the resource owner and admins manage keys.

Authentication

Send the key as-is in the Authorization header, with no Bearer prefix:

http
Authorization: ext-xxxxxxxxxxxxxxxx

Open API calls do not use the login token; their auth is independent from other endpoints.

Errors

StatusScenario
401Missing key, invalid format (no ext- prefix), nonexistent or revoked (no response body)

Missing resources or permissions return business errors (e.g. A_DATA_NOT_FOUND); unavailable models return A_MODEL_NOT_AVAILABLE.


Previous: API Reference · Next: Character Chat