API Reference
Every endpoint below is served from api.inferencedirect.com. For a end-to-end walkthrough, start with Docs.
Every endpoint below is served from api.inferencedirect.com. For a end-to-end walkthrough, start with Docs.
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/chat/completions | OpenAI-compatible chat completions. Streaming (SSE) and non-streaming. |
| POST | /v1/messages | Anthropic-compatible messages endpoint — point the Anthropic SDK straight at InferenceDirect. |
| GET | /v1/models | List every model your key can currently call. |
| GET | /v1/generation/{id} | The full metering record for one completion — model, tokens in/out, latency, and cost. |
| POST | /auth/device | Start the device-code login flow for a personal token (CLI / agent friendly). |
| POST | /auth/token | Exchange a completed device flow for an access token. |
| Base URL | Bills to |
|---|---|
| api.inferencedirect.com | your key's default node |
| api.inferencedirect.com/n/{node} | the selected division or team (must be within your key's node) |
Precedence: URL path, then X-Billing-Bucket header, then the key's own binding. A request can narrow its node, never escape it.
Missing or expired key. The OpenAI error envelope is preserved.
A budget cap is spent and set to hard-block enforcement.
Back off and retry — standard SDK retry logic handles this.