Chat Completions API
An early OpenAI chat completion API protocol whose request body uses a messages array. It is gradually being superseded by the Responses API; third-party providers that offer only this protocol require a protocol-conversion proxy to work with newer versions of Codex.
Core Facts
OpenAI's Chat Completions API has become the de facto industry standard, with most providers offering compatible interfaces.
OpenAI officially launched the Chat Completions API in March 2023, with a multi-turn conversation message list as its core.
The core of the OpenAI-compatible protocol is the /v1/chat/completions REST interface specification, which defines fields such as model, messages, and temperature, as well as the streaming response (Server-Sent Events) format.
Timeline (last 90 days)
GPT-6.1 Terra is compatible with the AI SDK, the OpenAI-compatible Chat Completions API, the Responses API, and coding agents connected to AI Gateway.
Developers can call Kimi K3.1 Pro via the AI SDK, Chat Completions API, Responses API, Anthropic Messages API, or a coding Agent connected to the AI Gateway.
OpenAI's Chat Completions API offers the logit_bias parameter, which accepts a dictionary mapping token IDs to bias values ranging from -100 to 100, with negative values suppressing and positive values boosting.
In Codex CLI 0.162.1, `wire_api = "chat"` causes a startup error because the new version removed the chat option and supports only the Responses API.
The chat API is stateless, so to achieve multi-turn conversation the client must put the previous user and assistant messages into the messages array of the current request, and the history messages are billed again as input tokens every turn.
The Chat Completions API's streaming protocol pushes data in units of delta incremental fragments, and the consumer only needs to concatenate the text in order.
Projects still relying on the legacy completions endpoint should migrate to the Chat Completions or Responses API as soon as possible to avoid future compatibility issues.
The OpenAI Chat Completions API is based on JSON over HTTPS, with request bodies containing fields such as model and messages, and response bodies returning a choices array and usage statistics
After the Chat Completions API is removed, projects that directly depend on that interface may fail to compile or encounter runtime errors after upgrading.
@ai-sdk/xai 5.0.0 contains a breaking change: the Chat Completions API has been removed.
1 more timeline events
All Facts (17)
OpenAI's Chat Completions API has become the de facto industry standard, with most providers offering compatible interfaces.
80%VerifiedOpenAI officially launched the Chat Completions API in March 2023, with a multi-turn conversation message list as its core.
75%VerifiedThe core of the OpenAI-compatible protocol is the /v1/chat/completions REST interface specification, which defines fields such as model, messages, and temperature, as well as the streaming response (Server-Sent Events) format.
65%UnverifiedChat Completions API 的消息序列模式后来被 Anthropic、Google、Mistral 等几乎所有模型提供商采纳,成为事实上的行业标准
85%UnverifiedThe Responses API is an evolved version of the Chat Completions API, integrating built-in tools such as web search, file search, and a code interpreter.
70%UnverifiedThe Responses API is a next-generation API interface launched by OpenAI in 2025, intended to replace the Chat Completions API.
60%UnverifiedThe OpenAI Chat Completions API model itself is stateless; each request requires the client to send the complete conversation history together, and the server does not store any session state.
60%UnverifiedGPT-6.1 Terra is compatible with the AI SDK, the OpenAI-compatible Chat Completions API, the Responses API, and coding agents connected to AI Gateway.
50%UnverifiedDevelopers can call Kimi K3.1 Pro via the AI SDK, Chat Completions API, Responses API, Anthropic Messages API, or a coding Agent connected to the AI Gateway.
50%UnverifiedOpenAI's Chat Completions API offers the logit_bias parameter, which accepts a dictionary mapping token IDs to bias values ranging from -100 to 100, with negative values suppressing and positive values boosting.
50%UnverifiedIn Codex CLI 0.162.1, `wire_api = "chat"` causes a startup error because the new version removed the chat option and supports only the Responses API.
50%UnverifiedThe chat API is stateless, so to achieve multi-turn conversation the client must put the previous user and assistant messages into the messages array of the current request, and the history messages are billed again as input tokens every turn.
50%UnverifiedThe Chat Completions API's streaming protocol pushes data in units of delta incremental fragments, and the consumer only needs to concatenate the text in order.
50%UnverifiedProjects still relying on the legacy completions endpoint should migrate to the Chat Completions or Responses API as soon as possible to avoid future compatibility issues.
50%UnverifiedThe OpenAI Chat Completions API is based on JSON over HTTPS, with request bodies containing fields such as model and messages, and response bodies returning a choices array and usage statistics
50%Unverified@ai-sdk/xai 5.0.0 contains a breaking change: the Chat Completions API has been removed.
50%UnverifiedAfter the Chat Completions API is removed, projects that directly depend on that interface may fail to compile or encounter runtime errors after upgrading.
50%