OpenAI-Compatible API
What is OpenAI-Compatible API?
In one sentence: An OpenAI-compatible API is an API that copies the request and response format of OpenAI's API, so the same code works with different providers.
What does OpenAI-Compatible API look like?
Pointing an app's base URL at a local Ollama server instead of a cloud service, with no other code changes.
Why does OpenAI-Compatible API matter?
It reduces lock-in and makes switching models easy.
Last updated · Fact-checked by The AI Math
Linking to this page from a lesson or article? <a href="https://getaimath.com/dictionary/openai-compatible-api/">OpenAI-Compatible API, explained simply</a> (The AI Math Dictionary)