Skip to content
BENIBIX Learn

OpenAI API vs OpenAI-Compatible API

People think any server that speaks the OpenAI format is OpenAI's own API. The OpenAI API is a service run by OpenAI, and it runs only its own models. A compatible API is any server that takes calls in the same shape. It might run a model on your laptop, or one from another firm. Your code stays the same, but the model behind it changes.

Development🧬 AI Engineering

OpenAI API

OpenAI's own web service. Your code sends it a request and gets a reply.

The OpenAI API is OpenAI's web service for using its GPT models in your code. For new apps, OpenAI says to use the Responses API. It lives at api.openai.com/v1/responses. The older Chat Completions API still works. Your key goes in a header called Authorization. There are code kits for Python, JavaScript, .NET, Java, Go and Ruby.

Example
Jack's help bot sends each customer question to the OpenAI API. It uses the Responses API, and the reply text goes straight into the chat window.
Why it matters
Its request shape became a common one. Many other model makers and local tools take calls in that shape.
Full entry
AI💻 Running Locally

OpenAI-Compatible API

A server that takes the same requests as OpenAI's API. Apps can switch to it.

An OpenAI-compatible API is a server that takes requests in the same shape as OpenAI's API. Many local tools have one, such as Ollama, LM Studio, Jan and llama.cpp. An app made for OpenAI can talk to them. You change only the web address. The model behind it can then be one on your own machine. This shape became the common one, so one app can switch between many models.

Example
Jack's app calls the OpenAI API. He points it at http://localhost:11434/v1 instead. The same code now talks to a model in Ollama on his laptop.
Why it matters
You can try a local model in an app you already have, with no new code.
Full entry

In one line

OpenAI API
OpenAI's own web service. Your code sends it a request and gets a reply.
OpenAI-Compatible API
A server that takes the same requests as OpenAI's API. Apps can switch to it.

These live in different corners of the glossary (Development and AI), which is exactly why they get confused.