Authentication
Send your io-sk- key as a Bearer token or in the x-api-key header.
Every request needs an API key. Keys are io-sk- followed by 43 letters and digits, and they belong to an organization. Requests made with a key draw from that organization's balance.
Sending the key
The API accepts the key in either header. Use whichever your SDK sends.
| Header | Used by |
|---|---|
Authorization: Bearer io-sk-… | OpenAI SDKs, most tools, curl |
x-api-key: io-sk-… | Anthropic SDKs, Claude Code |
Both headers work on every endpoint, including /v1/messages. If a request carries both, x-api-key is used.
curl https://api.interodin.com/v1/models \
-H "Authorization: Bearer $INTERODIN_API_KEY"Creating and revoking keys
Create keys in the console. A key is shown once, when you create it. We store only a hash, so we can't show it again. If you lose a key, revoke it and create a new one.
Revoking takes effect on every server within a minute, usually within seconds. After that, requests with the key fail with 401 invalid_api_key.
Limiting a key
When you create a key you can limit it:
- Monthly spend limit. Once the key has spent this much in a calendar month (UTC), its requests fail with
403 key_spend_limit_reacheduntil the next month. Other keys keep working. - Allowed models. Requests for any other model fail with
403 model_not_allowed.GET /v1/modelslists only the allowed models.
Give each app, environment or teammate its own key. Usage and logs in the console are broken down per key, and you can revoke one without touching the others.
Keeping keys safe
- Keep keys on the server. Never ship a key in a browser bundle, mobile app or public repository. The API doesn't accept browser (CORS) requests from other sites anyway.
- Read the key from an environment variable or a secret manager.
- If a key leaks, revoke it in the console at once.
Related errors
| Status | Code | Meaning |
|---|---|---|
| 401 | invalid_api_key | The key is missing, malformed or revoked. |
| 402 | insufficient_credits | The organization's balance is used up. Top up in the console. |
| 403 | model_not_allowed | The key is not allowed to use this model. |
| 403 | key_spend_limit_reached | The key hit its monthly spend limit. |
| 403 | organization_suspended | The organization is suspended. Contact support. |
Every response carries an x-request-id header. Quote it when you contact support.
See Errors and rate limits for the full list.