Home / Docs / API overview

API overview

Every endpoint the gateway exposes, which format it speaks, and what it returns.

Three endpoints. Two request formats. One key.

MethodPathFormatPurpose
POST/v1/messagesAnthropic MessagesChat completion, Anthropic envelope
POST/v1/chat/completionsOpenAI Chat CompletionsChat completion, OpenAI envelope
GET/v1/modelsOpenAI-style listModel ids your key can call

A machine-readable description is published at /openapi.json, and a plain-text summary of the whole site at /llms.txt and /llms-full.txt.

Choosing an endpoint

They front the same models at the same price. Pick by what your client already emits — do not translate formats yourself.

EndpointAuth headerResponse shapeStreaming
/v1/messagesx-api-key or Bearercontent[] array + usageSSE, content_block_delta events
/v1/chat/completionsBearerchoices[].message.contentSSE, choices[].delta.content chunks
The streaming shapes differ and are not interchangeable. A client written for choices[].delta.content will read nothing at all from a Messages stream. See Streaming.

Common headers

HeaderApplies toNotes
content-type: application/jsonboth POSTsRequired
x-api-keyMessagesAnthropic style
Authorization: BearerbothOpenAI style; also accepted by Messages
anthropic-version: 2023-06-01MessagesSet automatically by Anthropic SDKs
accept: text/event-streambothSet by SDKs when stream is true