InferenceDirect.com Docs Pricing Status Sign in

API Reference

Every endpoint below is served from api.inferencedirect.com. For a end-to-end walkthrough, start with Docs.

MethodEndpointDescription
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.

Node routing

Base URLBills to
api.inferencedirect.comyour 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.

Errors

401 Not authenticated

Missing or expired key. The OpenAI error envelope is preserved.

402 Budget exceeded

A budget cap is spent and set to hard-block enforcement.

429 Rate limited

Back off and retry — standard SDK retry logic handles this.