ModelRefs / OpenAI-Compatible API — AI Glossary

OpenAI-Compatible API — AI Glossary

An inference API that mirrors OpenAI's chat completions endpoint schema, enabling drop-in provider substitution. Compatible is not equivalent.

Overview

The de facto standard for LLM APIs: POST /v1/chat/completions with messages, model, temperature, max_tokens. Supported by Together AI, Groq, Fireworks, Ollama, LM Studio, vLLM, and dozens of others. Enables model-agnostic client code: change the base_url and model string, keep all other logic.

Reference details

Topicinference
Also known asOpenAI API compatible, chat completions API
Last reviewed2026-06-24

Example: Portable until it is not

Switching provider is base_url and model string. What does not travel is everything at the edges: tool-calling dialects, structured-output support, reasoning parameters, token accounting and error semantics. The core path ports cleanly; the features you actually rely on are where portability quietly stops.

Commonly confused with

Compatible is not equivalent. The label describes the request and response envelope, not behaviour. Two compatible endpoints can differ in tokenisation, default sampling, rate-limit semantics and which optional fields they honour — none of which the shared schema constrains.

When to use it

Reach for it when:

  • You want to keep provider substitution cheap
  • Evaluating several models against the same client code
  • Local and hosted inference should share one code path

Reach for something else when:

  • Assuming identical output across providers on the same input
  • Relying on an optional field without checking each provider honours it
  • You need a provider-specific capability, where the abstraction costs more than it saves

Continue your research

Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to OpenAI-Compatible API — AI Glossary.

Frequently asked questions

What is OpenAI-Compatible API?

An inference API that mirrors OpenAI's chat completions endpoint schema, enabling drop-in provider substitution.

Is OpenAI-Compatible API the same as OpenAI API compatible?

Yes — OpenAI API compatible, chat completions API are common aliases for OpenAI-Compatible API.

What concepts are related to OpenAI-Compatible API?

Closely related concepts include chat completion, model routing, gateway.