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
namestringHuman-readable label for the key
tagstringprivate (default) or public
permissionsarrayDefault: ["read:agents", "create:calls"]
restrictions.allowedAgentsIdsarrayRestrict key to specific agent IDs
restrictions.allowedOriginsarrayRestrict key to specific origins (CORS)
expiresAtdatetimeOptional 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