Blog

Chat Completions vs Messages vs Responses: which LLM API format?

Three request formats cover almost every LLM API in use today. OpenAI’s Chat Completions is the oldest and the most copied. Anthropic’s Messages is the native format for Claude. OpenAI’s Responses is the newer OpenAI format. They carry the same idea, a conversation in and text out, with different field names. Here they are side by side.

At a glance

Chat Completions Messages Responses
Path POST /v1/chat/completions POST /v1/messages POST /v1/responses
Required fields model, messages model, max_tokens, messages model, input
System prompt a message with role: "system" top-level system field top-level instructions field
Reply text choices[0].message.content content[0].text output items (output_text in the SDKs)
Auth header Authorization: Bearer x-api-key plus anthropic-version Authorization: Bearer
Streaming stream: true stream: true stream: true

Chat Completions

{
  "model": "cx/gpt-5.6-terra",
  "messages": [
    { "role": "system", "content": "Answer in one sentence." },
    { "role": "user", "content": "What is a token?" }
  ]
}

The reply has a choices array. The text is in choices[0].message.content. Because so many tools, frameworks and gateways copied this shape, it is the safest default when you want code to work in many places.

Messages

{
  "model": "cc/claude-sonnet-4-6",
  "max_tokens": 512,
  "system": "Answer in one sentence.",
  "messages": [{ "role": "user", "content": "What is a token?" }]
}

Two differences trip people up. max_tokens is required, and the system prompt is a top-level field, not a message. The reply’s content is an array of blocks. Plain text is in content[0].text, and other block types (tool calls, for example) sit next to it.

Responses

{
  "model": "cx/gpt-5.6-terra",
  "instructions": "Answer in one sentence.",
  "input": "What is a token?"
}

input can be a plain string or a list of items, which makes one-shot calls short. The reply’s output is a list of items. The official SDKs add an output_text helper that joins the text for you.

Which one to use

  • You already use the OpenAI SDK, or a framework built on it. Stay on Chat Completions.
  • You build mainly on Claude, or use the Anthropic SDK. Use Messages, Claude’s native format.
  • You start a new OpenAI-first project. Responses is OpenAI’s current format.
  • You want to switch models freely. Pick the format your code already speaks, and use a gateway that accepts all three.

One key, all three formats

On AIKeys, the same key works on all three paths, and any listed model can be called through any of them. Send a Claude id to Chat Completions or a GPT id to Messages, and the proxy converts the request to the format that model’s upstream uses.

Each upstream has a native format: cc/ models speak Messages, cx/ models speak the OpenAI formats, and ag/ models accept both. The conversion carries the core of a request: the model, the conversation, the token limit, and streaming. Fields that exist in only one format, such as the top-level system in Messages or instructions in Responses, may not carry over. If you rely on them, call the model in its native format, or put the system prompt in the shape the target format expects.

The API reference lists the fields for each path, and how to call Claude, GPT and Gemini with one key has copy-paste setup for Python, TypeScript and cURL.