Authentication

Vaux uses two kinds of credentials, the same pattern as other realtime media APIs.

CredentialFormatLives onUsed for
API keyvaux_live_…Your server onlyREST calls, minting client tokens
Client tokenopaque stringBrowser / mobile appOne realtime session, plus reading voices and sounds

Never put an API key in browser, mobile or desktop app code. Anyone can extract it. Always mint client tokens on your server.

API keys

Activate the API (free Sandbox plan) in Dashboard → Developers, then create and revoke keys in Developers → API keys. A key is shown once when created; we store only a hash. Send it as a bearer token:

curl https://api.vaux.ng/v1/voices -H "Authorization: Bearer $VAUX_API_KEY"

Client tokens

POST /v1/tokens creates a token for one realtime session.

curl https://api.vaux.ng/v1/tokens \
  -H "Authorization: Bearer $VAUX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "maxMinutes": 15, "expiresIn": 60, "allowedModes": ["voice", "type"], "metadata": { "endUser": "u_42" } }'
FieldTypeDefaultDescription
maxMinutesinteger 1–24010Hard cap on session length, enforced by the server. Also capped by your API plan and credit balance.
expiresIninteger 10–360060Seconds the client has to connect. Once connected, the session runs until maxMinutes.
allowedModesvoice, type, agent["voice","type"]Which modes this session may use. agent requires Starter or higher.
metadataobject of strings–Echoed back in usage so you can bill your own users. Use endUser for per-user reports.

Response 201:

{
  "token": "eyJzaWQi…",
  "sessionId": "65351836-e126-4087-ac08-9c54da4a21e6",
  "streamUrl": "wss://vaux.ng/v1/stream",
  "connectBy": "2026-10-14T15:44:19.119Z",
  "expiresAt": "2026-10-14T15:59:19.000Z",
  "maxMinutes": 15,
  "allowedModes": ["voice", "type"]
}

Each token allows one live connection. A second connection with the same token is rejected (409), so tokens can't be shared.

Rate limits

Each API plan sets a requests-per-minute limit and a maximum number of live sessions at once:

PlanRequests / minuteLive sessions
Sandbox201
Starter605
Growth30025
Scale1,000100

Going over returns 429 with code rate_limited or concurrency_limit. Need more? Contact us about Enterprise.