OpenAI-compatible API
An OpenAI-compatible API is an HTTP interface, offered by an inference server or a model provider other than OpenAI, that accepts requests and returns responses in the shape of the OpenAI API, most often its Chat Completions endpoint. A client written for OpenAI can then talk to the other service by changing three settings: the base URL, the API key and the model name.[38][56] The official OpenAI Python library exposes the first of these as a base_url argument or an OPENAI_BASE_URL environment variable.[9]
OpenAI defines the format for its own service and publishes an OpenAPI description of it.[2] Other parties reimplement it. They include widely used software for serving open-weight models, such as vLLM, the llama.cpp server, Ollama, LM Studio and LocalAI; hosted providers such as Together AI, Fireworks AI, Groq and OpenRouter; and, as compatibility layers beside their native APIs, Google and Anthropic.[20][25][18][26][27][30][31][32][33][38][39] A January 2026 Hugging Face post called the Chat Completion format "still the de facto standard despite the alternatives", and The New Stack described it the same way that month.[44][53]
Compatibility describes the wire format, not behaviour. Implementations support different subsets of the fields, treat unsupported fields differently, and add their own extensions. Groq, Anthropic and Together AI each document such differences.[32][39][30] Since March 2025 OpenAI has recommended a newer interface, the Responses API, for new projects, and in January 2026 it started Open Responses, a multi-provider specification derived from that newer API.[7][8][44]
What the interface consists of
Endpoints
The term usually refers to a handful of routes that OpenAI serves under https://api.openai.com/v1.[1][2] The table lists routes that the implementations described below reproduce, with each path as it appears in OpenAI's published OpenAPI description.[2]
| Route | Purpose | Notes |
|---|---|---|
POST /chat/completions | Generate the next assistant message for a list of messages | The route the term most often refers to |
POST /completions | Continue a raw text prompt | The older text-in, text-out format; still served by vLLM, llama.cpp, Ollama, LM Studio, Together AI and Fireworks AI [20][25][18][26][30][31] |
POST /embeddings | Return embedding vectors for input text | |
GET /models | List the models the server offers | |
POST /responses | The newer Responses format | Added by several servers and providers; see below |
POST /decisions | Answer classification or scoring questions about an input | Documented by vLLM and LM Studio [21][26] |
/audio/speech, /audio/transcriptions, /images/generations | Speech, transcription and image generation | Implemented by some providers, for example Together AI [30] |
Requests and messages
A Chat Completions request is a JSON object with a model name and a messages array. Each message has a role and content. OpenAI's specification defines the roles developer, system, user, assistant and tool (plus a deprecated function role), and states that with its o1 models and later, developer messages replace system messages.[2] Content can be a plain string or an array of typed parts, which is how images and audio are attached.[2] Optional fields control sampling and length, among them temperature, top_p, stop, n, frequency_penalty, presence_penalty, logit_bias, seed (which the specification marks as deprecated) and max_tokens, which OpenAI has deprecated in favour of max_completion_tokens.[2]
The response is a chat.completion object holding a choices array. Each choice carries the generated message and a finish_reason, which is stop, length, tool_calls or content_filter (the specification also keeps a deprecated function_call value). A usage object reports prompt_tokens, completion_tokens and total_tokens.[2] Authentication is a bearer token in the Authorization header.[1][56]
The message list is an abstraction over the model's real input. Chat models are fine-tuned on text formatted as a sequence of messages, and the formats and control tokens differ from model to model. A server for open-weight models converts the messages array into the right layout with the model's chat template before tokenization.[43] vLLM, for example, needs a Jinja2 chat template, taken from the model's tokenizer configuration or supplied with its --chat-template option, and chat requests fail without one, while SGLang applies the template from the Hugging Face tokenizer automatically.[21][28] OpenAI's own 2023 announcement made the same point about its models: the input is still rendered as a sequence of tokens, in a format it called Chat Markup Language (ChatML).[1]
On a local server the API key can be a placeholder. Ollama's documentation says the client requires an API key value but Ollama ignores it.[18] vLLM can require a key through its --api-key option, but its documentation warns that the option does not authenticate every endpoint on the server and should not be the only protection.[20]
A request to a local Ollama server, taken from Ollama's announcement of the feature, shows the pattern. Ollama's instruction is to use the same OpenAI format and change the hostname:[17]
curl http://localhost:11434/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "llama2",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}'
Streaming
Setting stream to true makes the server send the reply incrementally as server-sent events, a text-based format defined in the WHATWG HTML standard and delivered with the text/event-stream content type.[2][3] Each event's data: line carries a chat.completion.chunk object whose delta holds the next fragment of the message, and the stream ends with the literal line data: [DONE].[2] With stream_options.include_usage, one extra chunk with an empty choices array reports token usage for the whole request just before the end marker.[2]
Tool calling
Function calling lets the caller describe functions with JSON Schema in a tools array. When the model decides to call one, the assistant message contains tool_calls, each with an id, a function name and an arguments string of JSON. The application runs the function and sends the result back as a message with the role tool and the matching tool_call_id.[2] A tool_choice field accepts none, auto, required or a named function, and parallel_tool_calls governs whether several calls may be returned at once.[2] The original 2023 parameters, functions and function_call, are deprecated in favour of tools and tool_choice.[2][4] The specification warns that the model may produce invalid JSON or arguments the schema does not define, so callers should validate them.[2] The general technique is covered in tool use.
Structured output
The response_format field has two JSON options. {"type": "json_object"}, the older JSON mode, makes the model emit syntactically valid JSON. {"type": "json_schema", ...} enables what OpenAI calls Structured Outputs, in which the output must match a supplied schema.[2] OpenAI implements the second with constrained decoding: it converts the schema into a context-free grammar and restricts sampling to tokens that keep the output valid.[6] A strict: true flag on a function definition applies the same guarantee to tool arguments.[6] See structured output for the wider topic.
History
OpenAI announced its API on June 11, 2020, as a private beta with access by request, and described it as a general-purpose "text in, text out" interface: a prompt went in and a completion came back.[59] The chat format arrived on March 1, 2023, when OpenAI released the gpt-3.5-turbo model behind ChatGPT through a new /v1/chat/completions endpoint that took "a sequence of messages together with metadata" instead of unstructured text.[1]
Software for running other models copied the format within weeks. FastChat, a model-serving platform from LM-SYS, merged a pull request titled "OpenAI ChatGPT compatible restful API + Python SDK" on April 17, 2023, and its documentation presents the server as a local drop-in replacement for OpenAI's APIs.[12][13] vLLM, developed at UC Berkeley and announced on June 20, 2023, shipped with an OpenAI API-compatible server, and the paper describing the system says its frontend extends the OpenAI API interface.[11][10] The Python bindings for llama.cpp likewise offer a web server that aims to be a drop-in replacement for the OpenAI API.[58]
OpenAI kept extending the endpoint. Function calling was added on June 13, 2023.[4] JSON mode and the ability to call several functions in one message were announced at OpenAI's DevDay on November 6, 2023.[5] Structured Outputs followed on August 6, 2024.[6]
More projects and vendors followed. Hugging Face added an OpenAI-compatible Messages API to Text Generation Inference in version 1.4.0, released January 26, 2024.[14][15] Ollama announced built-in compatibility with the Chat Completions API on February 8, 2024.[17] Google made Gemini models reachable through the OpenAI libraries on November 8, 2024, starting with Chat Completions and embeddings.[37] Anthropic launched an OpenAI-compatible endpoint for Claude on February 27, 2025.[40]
On March 11, 2025 OpenAI introduced the Responses API. It said at the time that Chat Completions remained its most widely adopted API and would continue to receive new models, while recommending Responses for new integrations.[7]
| Date | Event |
|---|---|
| 2020-06-11 | OpenAI API announced in private beta, with a text completion interface [59] |
| 2023-03-01 | Chat Completions endpoint released with gpt-3.5-turbo [1] |
| 2023-04-17 | FastChat merges an OpenAI-compatible REST API [12] |
| 2023-06-13 | Function calling added to Chat Completions [4] |
| 2023-06-20 | vLLM announced with an OpenAI API-compatible server [11] |
| 2023-11-06 | JSON mode and multiple function calls per message [5] |
| 2024-01-26 | Text Generation Inference 1.4.0 adds an OpenAI-compatible API [14] |
| 2024-02-08 | Ollama announces Chat Completions compatibility [17] |
| 2024-08-06 | Structured Outputs [6] |
| 2024-11-08 | Google offers Gemini through the OpenAI libraries [37] |
| 2025-02-27 | Anthropic launches an OpenAI-compatible endpoint [40] |
| 2025-03-11 | OpenAI introduces the Responses API [7] |
| 2026-01-15 | Open Responses specification launched [47] |
| 2026-10-22 | Open Responses joins the Agentic AI Foundation [54] |
Implementations
Self-hosted inference servers
The table summarises what each project's own documentation listed as of November 2026.
| Software | OpenAI-style routes documented | Other request formats | Source |
|---|---|---|---|
| vLLM | Completions, Chat Completions, Responses, Decisions, embeddings, audio transcription and translation | Anthropic Messages (/v1/messages); Cohere embed and rerank; TypeSafe System One (/v1/systemone) | [20][21] |
| llama.cpp server | Models, Completions, Chat Completions, Responses, embeddings, speech | Anthropic Messages (/v1/messages); TypeSafe System One (/v1/systemone) | [25] |
| Ollama | Chat Completions, Completions, models, embeddings, audio, Responses (stateless only) | Anthropic Messages, since v0.14.0 | [18][19] |
| LM Studio | Models, Responses, Decisions, Chat Completions, embeddings, Completions | Anthropic Messages (/v1/messages); TypeSafe System One (/v1/systemone) | [26][65][66] |
| LocalAI | Text, vision, speech, image, embedding and reranking endpoints in the OpenAI format | Anthropic format | [27] |
| SGLang | Chat Completions, Completions, vision and embeddings | Anthropic Messages (/v1/messages) | [28][29] |
| Text Generation Inference | Chat Completions (called the Messages API), from 1.4.0 | Its own custom API | [15] |
vLLM, llama.cpp, Ollama and LocalAI are open-source software: the vLLM repository carries the Apache License 2.0 and the other three the MIT License.[60][61][62][63] The projects differ in how strongly they claim conformance. SGLang's documentation says its server fully implements the OpenAI API, whereas the llama.cpp README says of its chat endpoint that "no strong claims of compatibility with OpenAI API spec" are made, only that it is enough to support many applications.[28][25] The llama.cpp /v1/responses route works by converting the request into a Chat Completions request.[25] Text Generation Inference is no longer under active development: its README says the project is in maintenance mode and recommends vLLM, SGLang, llama.cpp or MLX going forward, and the GitHub repository was archived (made read-only) on March 21, 2026.[16]
Guides to running these servers are in How to run LLMs locally and Self-hosting LLMs.
Hosted providers and routers
| Provider | Base URL for OpenAI clients | What the documentation says | Source |
|---|---|---|---|
| Together AI | https://api.together.ai/v1 | Compatible with the OpenAI REST API and SDKs across chat, completions, vision, images and speech | [30] |
| Fireworks AI | https://api.fireworks.ai/inference/v1 | The OpenAI Python client can be used by changing the base URL and key | [31] |
| Groq | https://api.groq.com/openai/v1 | Designed to be "mostly compatible" with OpenAI's client libraries | [32] |
| OpenRouter | https://openrouter.ai/api/v1 | Schemas "very similar" to OpenAI's, normalised across models and providers | [33] |
| DeepSeek | https://api.deepseek.com | An API format compatible with OpenAI and Anthropic | [34] |
| Hugging Face Inference Providers | https://router.huggingface.co/v1 | A drop-in replacement for the Chat Completions API | [36] |
Compatibility layers from Google and Anthropic
Google and Anthropic each have a native API with a different shape and offer the OpenAI format as a secondary route. Google's documentation says Gemini models can be reached through the OpenAI libraries by changing three lines of code, recommends calling the Gemini API directly for developers not already using those libraries, and described the support as still in beta as of November 2026.[38] Anthropic's documentation says its layer "is primarily intended to test and compare model capabilities, and is not considered a long-term or production-ready solution for most use cases", and points developers to the native Claude API for features such as prompt caching, which the layer does not support.[39]
Gateways and translation layers
A third group sits between clients and providers. LiteLLM gives a single interface, in the OpenAI format, to what its documentation counts as "100+ LLMs", including OpenAI, Anthropic, Vertex AI and Amazon Bedrock.[42] OpenRouter does the same job as a hosted service.[33] Agent frameworks rely on the same convention: OpenAI stated that its Agents SDK works with models from other providers as long as they offer a Chat Completions style endpoint.[7]
Where implementations diverge
The differences below are taken from the implementers' own documentation as of November 2026.
| Area | Documented behaviour |
|---|---|
| Unsupported fields rejected | Groq returns a 400 error if logprobs, logit_bias, top_logprobs or messages[].name are supplied, and requires n to be 1 [32] |
| Unsupported fields ignored | Anthropic silently ignores most unsupported fields, such as seed, logprobs and the penalty parameters; Together AI accepts service_tier, store, metadata and prediction but ignores them [39][30] |
| Tool choice | Ollama lists tool_choice as unsupported; vLLM supports named, auto, required and none choices, and for most models the named, auto and required forms work only when the server is started with --enable-auto-tool-choice and a --tool-call-parser suited to the model [18][22] |
| Schema enforcement | Anthropic's layer ignores strict on function definitions, so tool arguments are not guaranteed to match the schema, and its response_format accepts only json_schema with strict: true [39] |
| Structured output mechanics | vLLM constrains output with the xgrammar or guidance backends and takes extra options through a non-standard structured_outputs parameter; llama.cpp accepts a JSON schema inside response_format and enforces it with grammar-based sampling [23][20][25] |
| System messages | Anthropic hoists all system and developer messages and concatenates them at the start of the conversation [39] |
| Reasoning output | DeepSeek returns a model's chain of thought in a reasoning_content field beside content; vLLM returns it in a field named reasoning, renamed from reasoning_content, and notes that the OpenAI Python client does not officially support the attribute in streaming output [35][24] |
| Reasoning controls | Gemini maps reasoning_effort onto its own thinking levels or budgets; Anthropic's layer ignores reasoning_effort [38][39] |
| Sampling | Groq converts a temperature of 0 to 1e-8; vLLM accepts parameters OpenAI lacks, such as top_k, through the client's extra_body [32][20] |
| Length limits | When the prompt plus max_tokens exceeds the context window, Fireworks AI lowers max_tokens by default, where it says OpenAI returns an error [31] |
| Model names | Together AI uses namespaced identifiers and returns a 404 for OpenAI model strings such as gpt-4o [30] |
| Images | Ollama accepts base64-encoded images but not image URLs; vLLM does not support the image_url.detail parameter [18][20] |
| Errors | Together AI returns OpenAI-shaped error objects whose type and code values are its own [30] |
Tool calling depends on the model as well as the server. For open-weight models the server has to render the tool definitions into the prompt with the chat template and then parse the model's raw text back into tool_calls, and each model family writes calls in its own syntax. vLLM ships separate parsers for families including Hermes, Mistral, Llama, IBM Granite, Qwen and DeepSeek, selected by a server flag, and llama.cpp notes that parallel tool calls work only on some models.[22][25]
A Vercel article on the subject summarises the practical consequence: "Compatibility covers request and response formats, but it does not guarantee identical behavior." It advises testing streaming, structured output, reasoning settings and errors against each provider before relying on a switch.[56]
Portability between closed and open-weight models
The practical effect of the shared format is that application code, client libraries and tools written for OpenAI's hosted models can be pointed at an open-weight model, whether it runs on the developer's own machine or at a hosting provider. Hugging Face tells developers who already use OpenAI's Python client to swap the base URL to reach open-weight models through its provider network.[36] SGLang's documentation gives a smooth transition from OpenAI services to self-hosted local models as the reason for its OpenAI-compatible APIs.[28] Vercel lists the common motives for switching as trying a model that handles a task better, comparing models on the same prompts, and keeping a second provider ready for outages.[56]
The same mechanism lets coding agents built for one vendor's models run on others. LM Studio documents that OpenAI's Codex works with it because it implements the /v1/responses endpoint, and Ollama added the Anthropic Messages format so that Claude Code could be used with models served by Ollama.[26][19]
There are documented limits to this portability:
- A compatible endpoint may expose only part of a provider's native API, so features outside the shared subset require the native interface. Anthropic's layer, for instance, does not support prompt caching or audio and file inputs.[39][56]
- The Chat Completions format itself was designed for turn-based conversation. The Hugging Face post introducing Open Responses says it "falls short for agentic use cases", and The New Stack lists the gaps as it sees them: the client must resend the whole conversation on each request, multi-step tool use needs loop logic in application code, and reasoning from earlier turns is lost.[44][53]
- OpenAI itself reports better results from its newer interface for its own reasoning models, citing a 3% improvement on SWE-bench in internal evaluations and better cache utilisation compared with Chat Completions.[8]
A 2026 preprint by Amadeus Brandes groups "OpenAI compatible" with "S3-compatible" and "PostgreSQL-compatible" as claims that enterprise buyers treat as proxies for a future ability to substitute suppliers, and argues that most compatibility claims do not secure the substitution path they imply. It proposes five conditions for telling a claim that reduces risk from one that only lowers the cost of a first integration. The paper's worked cases are other infrastructure standards, and it names AI infrastructure as the most urgent next area to apply the test to.[57]
Related and successor interfaces
Responses API
The Responses API, launched on March 11, 2025, was presented by OpenAI as combining the simplicity of Chat Completions with the tool use of its Assistants API.[7] Where Chat Completions exchanges messages, Responses exchanges typed items: a message is one kind of item, and a function call and its output are others. It can keep conversation state on the server, runs built-in tools such as web search inside a single request, and drops the n parameter for multiple parallel generations.[8] OpenAI's guidance as of 2026 is that Chat Completions remains supported and Responses is recommended for all new projects.[8]
Third parties have begun to implement the /v1/responses route as well. As of November 2026 it is documented by vLLM, llama.cpp, Ollama, LM Studio, Together AI, Groq and OpenRouter, though coverage varies: Ollama supports only the stateless form, without previous_response_id.[20][25][18][26][30][32][33]
Open Responses
Open Responses is a specification, with an OpenAPI schema and acceptance tests, for multi-provider interfaces based on the Responses API. It launched on January 15, 2026.[45][47] Hugging Face described it as initiated by OpenAI and built with the open-source community, and launch partners named in press coverage included Hugging Face, NVIDIA, Vercel, OpenRouter, LM Studio, Ollama and vLLM.[44][51][53] The specification makes the Responses format stateless by default, lets providers expose raw reasoning, and defines streaming as server-sent events with named semantic event types; a trailing [DONE] marker is optional.[44][46] A revision dated April 24, 2026 added a WebSocket transport and a POST /v1/responses/compact route.[47] The project describes itself as open-source, and its repository is under the Apache License 2.0.[45][64]
On October 22, 2026 the Agentic AI Foundation, part of the Linux Foundation, announced that OpenAI had contributed Open Responses to it.[54][52] The project's technical charter, adopted the day before, places technical oversight with a steering committee initially made up of its maintainers.[48] The New Stack reported support from AWS (in Bedrock), Databricks, Red Hat and others in addition to the launch partners, and noted that Anthropic and Google were not among them.[52]
Simon Willison called it the standardisation effort he had most wanted for LLMs. He wrote that he had hoped for a standard based on Chat Completions, since so many products had already cloned that API, but that basing it on Responses made sense because that API was designed around features of recent models such as reasoning traces. He added that a conformance suite for clients was still missing.[49] A developer quoted by InfoQ found it slightly ironic, but practical, to build an open standard on OpenAI's API.[50]
Anthropic Messages API
Anthropic's native Messages API (POST /v1/messages) is another request format that third parties have copied.[41][52] As of November 2026 vLLM, llama.cpp, Ollama, LM Studio, SGLang and LocalAI serve it alongside their OpenAI routes, and Together AI, Fireworks AI and DeepSeek offer Anthropic-compatible endpoints.[21][25][19][65][29][27][30][31][34] The New Stack attributed this largely to the success of Claude Code and listed Moonshot AI, Z.ai and MiniMax among the vendors exposing such endpoints. The same report noted that Google has its own Interactions API.[52]
Model Context Protocol
The Model Context Protocol (MCP), another Agentic AI Foundation project, addresses a different connection.[52] MCP standardises how an AI application connects to external systems such as data sources and tools.[55] An OpenAI-compatible API, like Open Responses, covers how an application talks to the model itself.[54] The two are used together: the Responses API can call remote MCP servers as one of its built-in tools.[8]
Continue reading
- OpenAI APIThe OpenAI API is a REST-based application programming interface that gives developers programmatic access to OpenAI's family of artificial intelligence models, including the GPT series of large language…Mentioned 8 times above
- Structured outputStructured output is a set of techniques and API features that constrain a large language model (LLM) to emit responses that exactly conform to a predefined format or schema, such as JSON, XML, or a custom…Mentioned 8 times above
- OpenAI Responses APIThe OpenAI Responses API is OpenAI's agent-oriented HTTP API, launched on March 11, 2025, that unifies the simplicity of the Chat Completions API with the statefulMentioned 7 times above
- Function callingFunction calling is a capability of large language models (LLMs) that lets a model decide, during generation, to invoke an external function or API and emit the function name plus its arguments as structured…Mentioned 3 times above
- LiteLLMLiteLLM is an open-source AI gateway from BerriAI that lets developers call more than 100 large language model providers (including OpenAI, Anthropic, Google Gemini, Amazon Bedrock and Azure OpenAI) through a…Listed in See also
- OpenAIOpenAI is an American artificial intelligence research and deployment organization.Mentioned 72 times above
More to read
Topics:AI InferenceAI InfrastructureDeveloper ToolsOpen Source AI
References
- ^1 ^2 ^3 ^4 ^5Brockman, Greg; Eleti, Atty; Georges, Elie; Jang, Joanne; Kilpatrick, Logan; Lim, Rachel; Miller, Luke; Pokrass, Michelle. "Introducing ChatGPT and Whisper APIs". OpenAI, March 1, 2023. Archived copy: web.archive.org/...ducing-chatgpt-and-whisper-apis
- ^1 ^2 ^3 ^4 ^5 ^6 ^7 ^8 ^9 ^10 ^11 ^12 ^13 ^14 ^15OpenAI. "OpenAI API: OpenAPI specification" (openapi.yaml). GitHub, openai/openai-openapi, retrieved November 2026. github.com/...openapi.yaml
- ^WHATWG. "HTML Living Standard, section 9.2: Server-sent events". html.spec.whatwg.org/...server-sent-events
- ^1 ^2 ^3Eleti, Atty; Harris, Jeff; Kilpatrick, Logan. "Function calling and other API updates". OpenAI, June 13, 2023. Archived copy: web.archive.org/...n-calling-and-other-api-updates
- ^1 ^2OpenAI. "New models and developer products announced at DevDay". OpenAI, November 6, 2023. Archived copy: web.archive.org/...er-products-announced-at-devday
- ^1 ^2 ^3 ^4Pokrass, Michelle. "Introducing Structured Outputs in the API". OpenAI, August 6, 2024. Archived copy: web.archive.org/...g-structured-outputs-in-the-api
- ^1 ^2 ^3 ^4 ^5OpenAI. "New tools for building agents". OpenAI, March 11, 2025. Archived copy: web.archive.org/...new-tools-for-building-agents
- ^1 ^2 ^3 ^4 ^5OpenAI. "Migrate to the Responses API". OpenAI API documentation. Archived copy of October 1, 2026: web.archive.org/...migrate-to-responses
- ^OpenAI. "OpenAI Python API library" (README). GitHub, openai/openai-python, retrieved November 2026. github.com/...README.md
- ^Kwon, Woosuk; Li, Zhuohan; Zhuang, Siyuan; Sheng, Ying; Zheng, Lianmin; Yu, Cody Hao; Gonzalez, Joseph E.; Zhang, Hao; Stoica, Ion. "Efficient Memory Management for Large Language Model Serving with PagedAttention". SOSP 2023. arXiv:2309.06180, September 12, 2023. arxiv.org/...2309.06180
- ^1 ^2Kwon, Woosuk; Li, Zhuohan; Zhuang, Siyuan; Sheng, Ying; Zheng, Lianmin; Yu, Cody; Gonzalez, Joey; Zhang, Hao; Stoica, Ion. "vLLM: Easy, Fast, and Cheap LLM Serving with PagedAttention". vLLM Blog, June 20, 2023. vllm.ai/...2023-06-20-vllm
- ^1 ^2suquark. "OpenAI ChatGPT compatible restful API + Python SDK", pull request #426. GitHub, lm-sys/FastChat, April 2023. github.com/...426
- ^LM-SYS. "OpenAI-Compatible RESTful APIs". FastChat documentation, GitHub. github.com/...openai_api.md
- ^1 ^2Hugging Face. "v1.4.0" release notes. GitHub, huggingface/text-generation-inference, January 26, 2024. github.com/...v1.4.0
- ^1 ^2Hugging Face. "HTTP API Reference". Text Generation Inference documentation, GitHub. github.com/...api_reference.md
- ^Hugging Face. "Text Generation Inference" (README). GitHub, retrieved November 2026. github.com/...text-generation-inference
- ^1 ^2 ^3Ollama. "OpenAI compatibility". Ollama Blog, February 8, 2024. ollama.com/...openai-compatibility
- ^1 ^2 ^3 ^4 ^5 ^6 ^7Ollama. "OpenAI compatibility". Ollama documentation, retrieved November 2026. docs.ollama.com/...openai-compatibility
- ^1 ^2 ^3Ollama. "Claude Code with Anthropic API compatibility". Ollama Blog, January 16, 2026. ollama.com/...claude
- ^1 ^2 ^3 ^4 ^5 ^6 ^7 ^8vLLM. "OpenAI-Compatible Server". vLLM documentation, GitHub, retrieved November 2026. github.com/...openai_compatible_server.md
- ^1 ^2 ^3 ^4vLLM. "Online Serving" (README). vLLM documentation, GitHub, retrieved November 2026. github.com/...README.md
- ^1 ^2vLLM. "Tool Calling". vLLM documentation, GitHub, retrieved November 2026. github.com/...tool_calling.md
- ^vLLM. "Structured Outputs". vLLM documentation, GitHub, retrieved November 2026. github.com/...structured_outputs.md
- ^vLLM. "Reasoning Outputs". vLLM documentation, GitHub, retrieved November 2026. github.com/...reasoning_outputs.md
- ^1 ^2 ^3 ^4 ^5 ^6 ^7 ^8 ^9ggml-org. "LLaMA.cpp HTTP Server" (tools/server/README.md). GitHub, ggml-org/llama.cpp, retrieved November 2026. github.com/...README.md
- ^1 ^2 ^3 ^4 ^5 ^6LM Studio. "OpenAI Compatibility Endpoints". LM Studio documentation, retrieved November 2026. lmstudio.ai/...openai-compat
- ^1 ^2 ^3LocalAI. "LocalAI" (README). GitHub, mudler/LocalAI, retrieved November 2026. github.com/...README.md
- ^1 ^2 ^3 ^4SGLang. "OpenAI APIs - Completions". SGLang documentation, GitHub, retrieved November 2026. github.com/...openai_api_completions.mdx
- ^1 ^2SGLang. "Anthropic-Compatible API". SGLang documentation, GitHub, retrieved November 2026. github.com/...anthropic_api.mdx
- ^1 ^2 ^3 ^4 ^5 ^6 ^7 ^8 ^9 ^10Together AI. "OpenAI compatibility". Together AI documentation, retrieved November 2026. docs.together.ai/...openai-compatibility
- ^1 ^2 ^3 ^4 ^5Fireworks AI. "OpenAI compatibility". Fireworks AI documentation, retrieved November 2026. docs.fireworks.ai/...openai-compatibility
- ^1 ^2 ^3 ^4 ^5 ^6Groq. "OpenAI Compatibility". GroqDocs, retrieved November 2026. console.groq.com/...openai
- ^1 ^2 ^3 ^4OpenRouter. "API Reference: An overview of OpenRouter's API". OpenRouter documentation, retrieved November 2026. openrouter.ai/...overview
- ^1 ^2DeepSeek. "Your First API Call". DeepSeek API Docs, retrieved November 2026. api-docs.deepseek.com
- ^DeepSeek. "Thinking Mode". DeepSeek API Docs, retrieved November 2026. api-docs.deepseek.com/...thinking_mode
- ^1 ^2Hugging Face. "Inference Providers". Hugging Face documentation, retrieved November 2026. huggingface.co/...index
- ^1 ^2Kilpatrick, Logan. "Gemini is now accessible from the OpenAI Library". Google Developers Blog, November 8, 2024. developers.googleblog.com/...om-the-openai-library
- ^1 ^2 ^3 ^4Google. "OpenAI compatibility". Gemini API documentation, retrieved November 2026. ai.google.dev/...openai
- ^1 ^2 ^3 ^4 ^5 ^6 ^7 ^8Anthropic. "OpenAI SDK compatibility". Claude documentation, retrieved November 2026. platform.claude.com/...openai-sdk
- ^1 ^2Anthropic. "Claude Platform release notes" (entry for February 27, 2025). Claude documentation. platform.claude.com/...overview
- ^Anthropic. "Messages". Claude API reference, retrieved November 2026. platform.claude.com/...messages
- ^LiteLLM. "Getting Started". LiteLLM documentation, retrieved November 2026. docs.litellm.ai/docs
- ^Hugging Face. "Chat templates". Transformers documentation, retrieved November 2026. huggingface.co/...chat_templating
- ^1 ^2 ^3 ^4 ^5shaun smith; ben burtenshaw; merve; Pedro Cuenca. "Open Responses: What you need to know". Hugging Face Blog, January 15, 2026. huggingface.co/...open-responses
- ^1 ^2Open Responses. "Open Responses" (overview). openresponses.org
- ^Open Responses. "Specification". openresponses.org/specification
- ^1 ^2 ^3Open Responses. "Changelog". openresponses.org/changelog
- ^Open Responses. "Technical Charter for Open Responses a Series of LF Projects, LLC", adopted October 21, 2026. openresponses.org/governance
- ^Willison, Simon. "Open Responses". Simon Willison's Weblog, January 15, 2026. simonwillison.net/...open-responses
- ^Luu, Hien. "Open Responses Specification Enables Unified Agentic LLM Workflows". InfoQ, February 2, 2026. infoq.com/...openai-open-responses
- ^Masiero, Manuel. "Open Responses: Unified LLM interface instead of adapter chaos". heise online, January 22, 2026. heise.de/...face-instead-of-adapter-chaos-11150330
- ^1 ^2 ^3 ^4 ^5Lardinois, Frederic. "OpenAI donates Open Responses, its spec for a common LLM API, to the Agentic AI Foundation". The New Stack, October 22, 2026. thenewstack.io/openai-donates-open-responses
- ^1 ^2 ^3Janakiram MSV. "Open Responses vs. Chat Completion: A new era for AI apps". The New Stack, January 27, 2026. thenewstack.io/...completion-a-new-era-for-ai-apps
- ^1 ^2 ^3Agentic AI Foundation. "Agentic AI Foundation Announces Four New Projects: Agent Skills, Open Responses, OpenEnv, and OpenSandbox". October 22, 2026. aaif.io/...-foundation-announces-four-new-projects
- ^Model Context Protocol. "What is the Model Context Protocol (MCP)?". MCP documentation, retrieved November 2026. modelcontextprotocol.io/...intro
- ^1 ^2 ^3 ^4 ^5Vercel. "How an OpenAI-compatible API works across providers". Vercel Articles, November 1, 2026. vercel.com/...openai-compatible-api
- ^Brandes, Amadeus. "The Substitution Escrow Threshold: When 'Compatible With' Becomes Safe Enough to Buy". arXiv:2608.21221, August 21, 2026. arxiv.org/...2608.21221
- ^abetlen. "Python Bindings for llama.cpp" (README). GitHub, abetlen/llama-cpp-python, retrieved November 2026. github.com/...README.md
- ^1 ^2Brockman, Greg; Murati, Mira; Welinder, Peter; OpenAI. "OpenAI API". OpenAI, June 11, 2020 (updated September 18, 2020). Archived copy: web.archive.org/...openai-api
- ^vLLM. "LICENSE" (Apache License 2.0). GitHub, vllm-project/vllm, retrieved November 2026. github.com/...LICENSE
- ^ggml-org. "LICENSE" (MIT License). GitHub, ggml-org/llama.cpp, retrieved November 2026. github.com/...LICENSE
- ^Ollama. "LICENSE" (MIT License). GitHub, ollama/ollama, retrieved November 2026. github.com/...LICENSE
- ^LocalAI. "LICENSE" (MIT License). GitHub, mudler/LocalAI, retrieved November 2026. github.com/...LICENSE
- ^Open Responses. "LICENSE" (Apache License 2.0). GitHub, openresponses/openresponses, retrieved November 2026. github.com/...LICENSE
- ^1 ^2LM Studio. "Anthropic Compatibility Endpoints". LM Studio documentation, retrieved November 2026. lmstudio.ai/...anthropic-compat
- ^LM Studio. "Jev Compatibility Endpoints". LM Studio documentation, retrieved November 2026. lmstudio.ai/...jev-compat
Improve this article
Add missing citations, update stale details, or write a clearer explanation. Anyone can edit: changes go live when you publish, and every edit is checked by an editor.
1 revision · v1 · 4,720 words · full history
Fact-checks are independent of edits: a reviewer re-verifies the article against its sources and stamps the date. How we verify
Research and drafting on this wiki are AI-assisted, under named human editorial standards. How AI is used here
Reviewer note: Independent fact-check before publication on November 19, 2026: 168 claims checked against 73 cited and independent sources; 2 material and 12 minor corrections applied before publication.
Cite this page: AI Wiki. "OpenAI-compatible API." aiwiki.ai, updated 18 Nov 2026, fact-checked 18 Nov 2026. CC BY 4.0. https://aiwiki.ai/wiki/openai_compatible_api

