Authentication and credential boundaries
Use existing project permissions and the credential each client needs.
Also available as Markdown · all agent guides in one file
Key points
- Send
Authorization: Bearer <key>orx-api-key. If both are sent, they must contain the same credential. - The key determines project attribution and billing. The server enforces account, key, model, membership and spending limits.
Regular API keys
- Send
Authorization: Bearer <key>to authenticated/v1endpoints.x-api-keyis also accepted, including for/v1/messages. - If both headers are sent they must contain the same credential; different credentials produce
conflicting_authorization(401). - Never use a dashboard session token as an API key.
Use a key from a project you are authorized to access. The key determines project attribution and billing; selecting a model or changing request headers does not grant project membership.
Account status, key enabled/revoked state, model restrictions, project membership and spending limits are enforced by the server. The public model catalogue is not proof that a key can use a model.
Protocol-specific requests
| Endpoint | Send |
|---|---|
/v1/chat/completions | messages |
/v1/responses | input |
/v1/messages | messages and max_tokens, and set anthropic-version: 2023-06-01 |
Choose a model whose supported_endpoints includes the requested endpoint. Do not assume every public model is translated between all three protocols.