API reference
Authentication
Send Authorization: Bearer rd_sk_… on every billable route. x-api-key is an exception for Anthropic-style clients.
Credentials
…| Credential | Header | Billed to |
|---|---|---|
API key rd_sk_prod_… / rd_sk_dev_… | Authorization: Bearer rd_sk_… | Your RODI wallet (or the key's provided-credit allotment) |
| API key, Anthropic style | x-api-key: rd_sk_… (only /v1/messages*, /v1/audio/*) | Same as above |
| OIDC access token ("Sign in with RodiumAI") | Authorization: Bearer <JWT> | The signed-in user's FRODI allotment |
Rules per route
| Route | Bearer key or token | x-api-key | No credential |
|---|---|---|---|
| POST /v1/chat/completions, /v1/responses, /v1/embeddings, /v1/images/generations, /v1/videos/generations | Required | Rejected (401) | 401 |
| POST /v1/messages, /v1/messages/count_tokens | Accepted | Accepted | 401 |
| POST /v1/audio/transcriptions, /v1/audio/speech | Accepted | Accepted | 401 |
| GET /v1/models, /v1/models/{id} | Optional: filters by the key's allowed models | Ignored | Public |
| GET /v1/models/coding | Ignored | Ignored | Public |
| GET /v1/wallet, /v1/pricing | Required (/v1/wallet needs an rd_sk_ key) | Rejected (401) | 401 |
| GET /v1/healthz, /v1/readyz | Not needed | Not needed | Public |
Authentication errors
| HTTP | error.code | Meaning |
|---|---|---|
| 401 | invalid_api_key | Missing or malformed header, wrong prefix, unknown, revoked or expired key |
| 401 | invalid_token | OIDC token expired, badly signed or issued for another client |
| 401 | insufficient_scope | OIDC token without the inference scope |
| 403 | insufficient_scope | API key with explicit scopes that exclude this endpoint |
| 403 | model_not_allowed | Model outside the key's allowed models |
| 403 | api_key_quota_exceeded | Monthly RODI quota of the key reached |
Full list: API errors. Key options and OIDC: Authentication guide.