Getting an API key
- Sign up at app.lokutor.com
- Go to API Keys in the dashboard
- Click Create API Key and give it a name
sk_.... It is shown once, when you create it: copy it then and store it securely. Lokutor keeps only a hash of it, so neither the dashboard nor support can show it again; the dashboard lists each key by its first and last characters (sk_live…a1b2). If you lose a key, delete it and create a new one.
Billing and limits
Every key on an account spends the same prepaid balance. Sessions and requests are charged as you use them (a voice agent is 4.2¢ a minute plus the language model by the token, about 5.2¢ a typical minute), and a new session or request needs at least $0.25 of balance. An account can hold 3 sessions at a time before its first top-up and 10 after; higher on request. Rates, top-ups, the welcome credit and the402 errors are in Pricing and billing.
Using your API key
Environment variable (recommended):/ws/tts, /ws/stt, /ws/agent). Sending the key in a header is preferred — it keeps the credential out of URLs, which can be recorded in logs and traces.
WebSocket query parameter:
WebSocket, which has no header API). Prefer the X-API-Key header everywhere else.
Short-lived WebSocket tickets (recommended in browsers): rather than putting your key in the socket URL, exchange it for a ticket just before connecting and put the ticket there instead. A ticket opens the same session, reveals nothing about the key, and stops working after 10 minutes, so one that ends up in a console or a log is harmless soon after.
Authorization or X-API-Key header, never in the URL. In a browser, mint tickets from your backend so the long-lived key never reaches the page.
Security
- Never commit API keys to version control
- Use separate keys for development, staging, and production
- Rotate keys regularly
- If a key is compromised, delete it from the dashboard and create a new one