What is an OpenAI-compatible API endpoint?
An OpenAI-compatible API endpoint is one that speaks the exact request and response shapes of the OpenAI API — the same /v1/chat/completions schema, the same streaming format, the same tool-call fields — so the official OpenAI SDK works against it by changing only the base URL and key. UberLLM is OpenAI-compatible (and Anthropic-compatible at /v1/messages), which is why switching to it is a one-line change.
The short definition
An endpoint is "OpenAI-compatible" when it accepts the same HTTP requests and returns the same response shapes as the OpenAI API. In practice that means:
- the
POST /v1/chat/completionsrequest body (model,messages,temperature,tools,stream, …) is accepted as-is; - the response is the same
choices[].messageobject, with the sameusagetoken counts; - streaming uses the same server-sent-events
data:chunks ending in[DONE]; - tool / function calling uses the same
tool_callsfields.
Because the contract matches, the official OpenAI SDK — in Python, JavaScript or any language — works against the endpoint when you change only the base URL and the API key. Your application code does not know the difference.
Why it matters
OpenAI-compatibility turned one vendor’s API into a de-facto standard. A compatible endpoint lets you keep the SDK, tooling and framework integrations you already use (LangChain, the Vercel AI SDK, LlamaIndex, dozens of agent frameworks) while changing what sits behind them.
That is the whole migration to UberLLM:
from openai import OpenAI
client = OpenAI(
base_url="https://api.uberllm.dev/v1", # the only line that changes
api_key="ull_your_key_here",
)
resp = client.chat.completions.create(
model="deepseek/deepseek-v4-flash",
messages=[{"role": "user", "content": "Hello!"}],
stream=True,
)
See the OpenAI SDK doc for the full set of supported parameters.
Compatible vs. a true drop-in
"Compatible" is a spectrum. Watch for endpoints that accept the request shape but drop streaming, ignore tool calls, or return non-standard usage. UberLLM implements the chat-completions contract including streaming, tool calls and token usage, and additionally exposes an Anthropic-compatible endpoint at /v1/messages so Anthropic SDKs and Claude Code work unchanged too — Anthropic SDK doc.
What UberLLM adds behind the standard endpoint
The endpoint is standard; the routing behind it is not. Every request is sent to the cheapest healthy seller for the model you named, failures before output are retried on the next seller, and the price you see (fee included) is the price you pay. Browse models at /models and live prices at /llm-api-pricing.
Keep reading
- The short answer: an OpenAI-compatible API for every model
- One API key for all LLMs
- LLM API glossary