Authentication
Send your API key as a bearer token on every request:
Authorization: Bearer fn_live_…Create keys in the dashboard. A key is shown once, when it is made. We keep only a fingerprint of it, so it can't be shown again. A revoked key stops working at once.
Keep keys on your server. Never ship one in an app or a web page, and never put one in a URL.
Key rules
Each key can carry its own rules. The API checks them on every request, before any audio is heard.
| Rule | What it does | Refusal |
|---|---|---|
| Permissions | Dictation, Transcription, or both. | 403 forbidden |
| Expiry | A date after which the key stops working. | 401 expired_api_key |
| IP allowlist | Addresses or CIDR ranges, IPv4 or IPv6. | 403 ip_not_allowed |
| Spending limit | Dollars over the key's lifetime, each week (UTC, from Monday) or each month (UTC). | 403 spend_limit |
A spend_limit refusal names the limit in metadata.limit_source: key_lifetime, key_week or key_month. Key info reads a key's spend and what is left of its limit.
Streams
A WebSocket can't always set headers, as in a browser. There, send the key as two subprotocols instead: function-api and bearer. followed by the key. See Streaming.