Skip to navigation

API Keys and Service Keys

Ortavox uses two types of API keys to authenticate requests.

Key Types

TypePrefixUsage
Privatesk_live_...Server-side only — full API access, never expose in browser
Publicpk_live_...Client-side safe — restricted to specific agents and origins

Creating an API Key

POST /v1/api-keys
Authorization: Bearer <your-token>
{
"name": "Production API Key",
"tag": "private",
"permissions": ["read:agents", "create:calls"],
"restrictions": {
"allowedAgentsIds": ["agent-uuid-1", "agent-uuid-2"],
"allowedOrigins": ["https://yourapp.com"]
},
"expiresAt": "2026-12-31T23:59:59Z"
}

Parameters

PropertyTypeRequiredDescription
namestring✅Human-readable label for the key
tagstring❌private (default) or public
permissionsarray❌Default: ["read:agents", "create:calls"]
restrictions.allowedAgentsIdsarray❌Restrict key to specific agent IDs
restrictions.allowedOriginsarray❌Restrict key to specific origins (CORS)
expiresAtdatetime❌Optional expiry date for the key

Important: The full key value (sk_live_...) is only shown once at creation time. Store it securely immediately.

Using a Key

Pass your API key as a Bearer token or as the x-api-key header:

# As Bearer token
Authorization: Bearer sk_live_yourkey
# As header
x-api-key: sk_live_yourkey