Chat Completions API

Protocol protocols published

Also known as: Chat API, Messages API, Conversational API

Definition

An API endpoint that accepts a conversation history (array of messages with roles) and returns the model's next response. This is the primary interface for conversational AI, supporting multi-turn dialogue, system prompts, and tool use. The format was introduced by OpenAI and adopted widely.

What this is NOT

  • Not legacy completions API (that takes raw text, not messages)
  • Not embedding API (different purpose)
  • Not the model itself (this is the interface)

Alternative Interpretations

Different communities use this term differently:

llm-practitioners

The /v1/chat/completions endpoint (OpenAI) or equivalent that takes messages with roles (system, user, assistant, tool) and returns a completion. The standard interface for chat-based LLM interaction.

Sources: OpenAI Chat Completions documentation, Anthropic Messages API

Examples

  • POST /v1/chat/completions with messages array
  • Anthropic's /v1/messages (similar concept)
  • Multi-turn conversation with alternating user/assistant messages
  • System prompt + user message + tool definitions

Counterexamples

Things that might seem like Chat Completions API but are not:

  • Legacy /v1/completions (raw text completion)
  • Embedding API (different purpose)
  • Image generation API

Relations

  • specializes openai-api (Chat completions is part of the OpenAI API family)
  • overlapsWith function-calling (Tool use is part of chat completions)
  • overlapsWith streaming (Chat completions supports streaming)

Implementations

Tools and frameworks that implement this concept: