OpenAI-compatible API
An API that accepts the same request and reply shapes as OpenAI's, so existing client code and libraries work against another model server.
In more detail
Local servers such as Ollama and LM Studio, and routers such as OpenRouter, offer one. Compatibility usually covers the common fields; features such as caching, citations or reasoning settings often differ, so test what you rely on.
Related terms
- Chat Completions API — OpenAI's older, widely copied API that takes a list of role-tagged messages and returns choices, each with a message and a finish reason.
- Ollama — An open-source tool that downloads open-weight models and serves them on your own machine through a local API.
- model router — A service that sends each request to one of many models or providers behind a single API, often with automatic fallbacks.
Taught in
- Choosing A Model — AI Engineering: LLM Apps, RAG & Agents
- The Request And The Response — AI Engineering: LLM Apps, RAG & Agents