Skip to main content
POST
Create API key

Headers

x-api-key
string | null

Your API key for programmatic access. Send it in the x-api-key header; you can create and manage keys from the Developers page.

Path Parameters

service_account_user_id
string
required

Body

application/json
name
string
required
permissions
required

The permissions of the X API key.

Public API-key permission universe supported by Threetone.

Available options:
models_read,
voices_read,
voices_write,
workspace_read,
workspace_write,
convai_read,
convai_write,
agents_architect,
agents_environment_variables_write,
create_user_api_key,
workspace_analytics_full_read,
webhooks_write,
service_account_write,
group_members_manage,
workspace_members_read,
workspace_members_invite,
workspace_members_remove,
terms_of_service_accept,
audit_log_read,
conversation_privacy_manage,
copy_resources_cross_workspace
credit_limit
integer | null

The credit limit of the API key per credit refresh period. If omitted, the key does not have its own credit cap.

allowed_ips
string[] | null

List of IP addresses or CIDR ranges allowed to use this API key. Each entry may be a CIDR range (e.g. '10.0.0.0/24') or a bare IP address (normalized to /32 or /128). Omit or pass null to allow all IPs.

Required array length: 1 - 100 elements
third_party_disable_allowed
boolean | null

Whether the holder of this key may disable it via the self-disable endpoint. On create, omit or pass null to use the workspace's default. Only honored for workspaces with self-disable access enabled.

tts_concurrency_limit
integer | null

Maximum concurrent text-to-speech/speech-to-speech requests for this API key. Only available for enterprise customers.

expires_at_unix
integer | null

Unix timestamp (in seconds) after which this API key stops working. When set, it must be at least 15 minutes and at most 90 days in the future. On create, omit or pass null for a key that never expires. On update, omit to leave it unchanged, or pass "clear" to remove the expiry (never expires). A workspace may disallow never-expiring keys, or allow them only on service account API keys; creating one or clearing an expiry then fails.

Example:

1735689600

Response

Successful Response

x-api-key
string
required
key_id
string
required