Authentication
Vaux uses two kinds of credentials, the same pattern as other realtime media APIs.
| Credential | Format | Lives on | Used for |
|---|---|---|---|
| API key | vaux_live_… | Your server only | REST calls, minting client tokens |
| Client token | opaque string | Browser / mobile app | One 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" } }'
| Field | Type | Default | Description |
|---|---|---|---|
maxMinutes | integer 1–240 | 10 | Hard cap on session length, enforced by the server. Also capped by your API plan and credit balance. |
expiresIn | integer 10–3600 | 60 | Seconds the client has to connect. Once connected, the session runs until maxMinutes. |
allowedModes | voice, type, agent | ["voice","type"] | Which modes this session may use. agent requires Starter or higher. |
metadata | object 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:
| Plan | Requests / minute | Live sessions |
|---|---|---|
| Sandbox | 20 | 1 |
| Starter | 60 | 5 |
| Growth | 300 | 25 |
| Scale | 1,000 | 100 |
Going over returns 429 with code rate_limited or concurrency_limit. Need more? Contact us about Enterprise.