---
title: "What Is an OpenAI-Compatible Endpoint?"
description: "A 101 for European Teams Considering a Sovereign Backend"
date: 2026-11-30
tags: ["AI","LLM","Inference"]
url: https://www.exoscale.com/blog/openai-compatible-endpoint/
---
# What Is an OpenAI-Compatible Endpoint?

![cover](https://www.exoscale.com/blog/openai-compatible-endpoint/cover.png)

"OpenAI-compatible" now shows up on the landing page of just about every inference provider, gateway, and self-hosted model server. It is worth being precise about what the phrase actually means, because for European teams the difference between an OpenAI-compatible interface and the jurisdiction that interface routes into is where the whole sovereignty question lives. At Exoscale, the Swiss-headquartered European sovereign cloud, we run this conversation regularly with teams that prototyped against OpenAI and now need to move the workload without rewriting the app.

**Quick summary of this article**

- An OpenAI-compatible endpoint is any HTTP API that reproduces enough of OpenAI's request and response conventions that an existing OpenAI SDK client can talk to it by changing `base_url` and `api_key`.
- OpenAI-compatible describes the interface, not the backend. A compatible endpoint doesn't have to run OpenAI's models or infrastructure, and usually doesn't.
- Switching endpoints is mostly a two-line change, `base_url` and `api_key`. The `model` string often changes too. Most application logic doesn't.
- The de facto standard covers `/v1/chat/completions`, `/v1/embeddings`, the streaming SSE contract, and the SDK call shape. Coverage of newer surfaces like `/v1/responses` is uneven.
- The URL in `base_url` determines routing. True data sovereignty depends on who operates that URL, their headquarters, their subprocessors, and the contract behind them. `base_url` alone isn't a compliance argument.
- For European teams, this is what makes moving from OpenAI to a sovereign backend a config swap rather than a rewrite.

## What does "OpenAI-compatible" actually mean?

An OpenAI-compatible endpoint is an HTTP API that reproduces OpenAI's request and response conventions closely enough that a client written against the OpenAI SDK can talk to it by changing only `base_url` and `api_key`. That is the working definition.

It is a de facto interoperability standard, not a formal one. There is no vendor-neutral body publishing a spec called "OpenAI-compatible." What exists is OpenAI's public API reference, and a large set of providers, proxies, and self-hosted servers that decided independently to mirror the same paths, payloads, parameters, and response shapes. The reason is practical: the OpenAI SDKs and the ecosystem of code samples, tutorials, and libraries around them were already the easiest interface for developers to reach for. Copying it was less friction than inventing something new.

The important distinction: **interface compatibility is not backend identity**. An OpenAI-compatible endpoint does not run on OpenAI's models or infrastructure. It usually runs somebody else's models on somebody else's hardware, exposing the same request shape.

## What makes an endpoint OpenAI-compatible?

### Common endpoints and request structures

Most OpenAI-compatible providers implement the same core paths:

- `/v1/chat/completions`: the primary chat endpoint, accepting a `messages` array plus a `model` string.
- `/v1/embeddings`: vector embeddings, accepting an `input` field and a `model`.
- `/v1/completions`: the older text-completion endpoint, still supported by many implementations.

A newer surface, `/v1/responses`, is emerging on OpenAI's own API to unify chat, tools, and stateful conversations. Support across compatible providers is variable and much thinner than for `/v1/chat/completions`; it should be checked per provider rather than assumed.

Within those endpoints, the request shape is what an OpenAI SDK user already writes: `model`, `messages`, `temperature`, `top_p`, `max_tokens`, `stream`, `tools`, `tool_choice`. Not every field is honored by every backend, but the field names and payload structure are what carry across.

### Streaming, responses, and SDK behavior

Streaming is the piece that reveals whether a provider took compatibility seriously. OpenAI streams responses as server-sent events with a specific delta-chunk shape and a `[DONE]` sentinel. A compliant OpenAI-compatible endpoint returns the same event stream, which is what lets the SDK's streaming iterator work without modification.

Response structure follows the same principle. The `choices` array, `message` object, `finish_reason`, and `usage` block are the shapes downstream code parses. If those are stable, the code parses them. If a provider changes them, they aren't really compatible.

Compatibility exists in degrees. Endpoint paths, request payloads, and streaming format are the near-universal core. Function/tool calling, structured output, and vision inputs are widely supported but with inconsistent semantics. The `/v1/responses` surface is emerging territory. Assume the core works; verify the rest against provider docs before you build on it.

| Interface element | Typical OpenAI-compatible behavior |
| --- | --- |
| Endpoint path | `/v1/chat/completions` and `/v1/embeddings` almost always present. `/v1/responses` variable. |
| Auth | `Authorization: Bearer <api_key>` header. |
| Model selection | `model` string. Value is provider-specific. |
| Request structure | OpenAI-shaped: `messages`, `temperature`, `max_tokens`, `stream`, `tools`. |
| Streaming | SSE with OpenAI-shaped delta chunks and `[DONE]` sentinel. |
| Response structure | `choices[].message`, `finish_reason`, `usage` block. |

## What changes when you switch to another OpenAI-compatible endpoint?

Usually two lines. Sometimes three.

```python
from openai import OpenAI

# Before: talking to OpenAI
client = OpenAI(
    api_key="sk-...",
)

resp = client.chat.completions.create(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello"}],
)

# After: talking to a self-hosted or European OpenAI-compatible endpoint
client = OpenAI(
    api_key="<new_key>",
    base_url="https://your-eu-endpoint.example/v1",
)

resp = client.chat.completions.create(
    model="mistral-small-latest",   # provider-specific model id
    messages=[{"role": "user", "content": "Hello"}],
)
```

The rest of the application, how it builds messages, how it handles streaming, how it parses the response, how it manages retries, stays the same. This is the property that makes the compatibility layer valuable. The interface is stable across backends, so the backend choice becomes an operational decision rather than an architectural one.

Self-hosted runtimes work the same way. vLLM ships an HTTP server implementing the OpenAI surface directly, so an OpenAI SDK client points at a vLLM instance the same way it points at any other compatible provider. LM Studio does the same for local models on a developer laptop. Proxies like LiteLLM sit in front of many backends and expose one OpenAI-compatible URL that routes to them. All of these are options; none is the only path.

## What stays the same and what can still differ?

Stays the same across most OpenAI-compatible endpoints:

- SDK usage. The `openai` client library, or a compatible one in another language, keeps working.
- Core request structure. `messages`, `model`, `temperature`, `stream`.
- Application flow. Message construction, streaming handling, response parsing.

Can still differ, and this is where teams get caught:

- Available and named models. The `model` string is provider-specific, and the underlying model behavior differs even where the name looks familiar.
- Supported parameters. Some backends ignore `logprobs` or `seed`. Some don't support `tools` at all.
- Rate limits, context windows, and pricing.
- Latency and SLAs.
- Tool-calling and structured-output semantics. The wire format may match; the behavior may not.
- Streaming details. Chunk cadence, keep-alive behavior, error framing during a stream.
- Error handling. HTTP status codes and error body shapes vary.

This is the honest version of the picture. Compatibility does not mean identity. It means the code doesn't need to be rewritten, not that the behavior is guaranteed to be identical.

## Why did OpenAI compatibility become a de facto standard?

Developer familiarity was already there. By the time other providers wanted a piece of the market, the OpenAI SDK and its call shape were the interface most people had already written against, and the tutorial and library ecosystem, LangChain, LlamaIndex, agent frameworks, assumed it.

For a new provider, offering a proprietary interface meant asking developers to learn a second SDK, rewrite integrations, and take on migration cost with no payoff on the interface itself. Offering an OpenAI-compatible endpoint meant existing code worked with a config change. That is a one-sided trade-off, and providers noticed.

Open-source runtimes reinforced it. vLLM implements the OpenAI HTTP surface as a first-class server. That was the moment the standard stopped being about commercial aggregators and became infrastructure. Anyone running a model on their own hardware could expose it through the same interface.

## Why OpenAI-compatible APIs matter

A few practical consequences for the teams building on them:

- Lower migration and integration effort. Moving from one provider to another is minutes of config, not a sprint of refactoring.
- Reduced lock-in on the interface. The infrastructure decision is decoupled from the app-development decision.
- Easier experimentation across models. A/B testing between backends is a config toggle.
- Routing, failover, and cost control across multiple backends become feasible because they all speak the same shape.
- Infrastructure choices, where the workload runs, under whose jurisdiction, at what latency, no longer force a rewrite of the client code.

That last point is what makes OpenAI compatibility interesting from a sovereignty perspective.

## How do OpenAI-compatible endpoints enable sovereign inference?

Here is the specific version of the argument, because this is the part European teams are usually asking about.

The `base_url` field is what decides where inference requests are sent. Everything else in the SDK call, messages, model string, streaming iterator, is jurisdiction-neutral. Change the URL and the traffic moves.

![](https://www.exoscale.com/blog/openai-compatible-endpoint/multiple-endpoints.webp)

A typical migration path looks like this: prototype against OpenAI to move fast, keep the OpenAI SDK as the interface, and when the workload is ready for production, point the client at a European inference endpoint. In our experience, teams that discover this pattern late in the build, after already writing custom clients or provider-specific integrations, spend real engineering time undoing the assumption. Teams that keep the OpenAI SDK as the boundary can move the backend later with a config change.

That is what compatibility buys: the ability to separate the app architecture from the initial model provider's jurisdiction.

**Important qualification.** `base_url` determines where the HTTP request goes. It does not, by itself, determine data sovereignty. The endpoint's URL is the routing decision. Actual sovereignty depends on:

- Where the inference infrastructure physically sits.
- The headquarters and legal seat of the provider operating it.
- Which subprocessors touch the request, and where.
- The data processing agreement and retention policy in place.
- Compliance requirements specific to the workload.

Swapping `base_url` to a European-looking URL operated by a US-headquartered provider does not solve the CLOUD Act question. "EU region of a US cloud" and "European sovereign cloud" are legally distinct positions, and the URL string looks the same in both. The compatibility layer makes the swap easy; it does not tell you which swap is the right one.

## What should European teams check before changing endpoints?

A short list. Nothing here is exotic; it is what teams tend to miss on the first migration.

- **API coverage.** Does the provider implement `/v1/chat/completions`, `/v1/embeddings`, and the SSE streaming contract in a way that matches what your code assumes?
- **Feature compatibility.** If you use function calling, structured output, or vision inputs, verify each of those against the provider's docs. Compatibility is thinner here than on the core.
- **Model compatibility.** The `model` string, the context window, and the actual model behavior under load. Don't assume a name maps to what you had before.
- **Operational requirements.** Latency at your traffic pattern, throughput, rate limits, SLAs, error semantics.
- **Sovereignty and compliance.** Where the request is processed. The provider's legal seat and jurisdiction. Subprocessors. Retention. Certifications relevant to your workload (ISO 27001, SecNumCloud, C5, sector-specific frameworks). Whether the provider is subject to the US CLOUD Act.

## When is an OpenAI-compatible endpoint the right choice?

It is the right default when:

- The team already has an OpenAI-SDK prototype and needs to take it to production without rewriting the client code.
- The team wants the option to change model or provider later without touching the app.
- The team is a European company that needs to separate application architecture from the initial provider's jurisdiction, exactly the pattern of prototyping on a US-based API and then moving the production workload to a European backend.
- The system needs to route across multiple models or providers behind a single client.

It is less useful when a workload depends on provider-specific features that the compatibility layer cannot reproduce: proprietary tool-orchestration behaviors, provider-native fine-tuning APIs, or bespoke response fields. Those still work; they just don't survive an endpoint swap.

## What OpenAI-compatible endpoints mean for infrastructure flexibility

Compatibility does two things at once. It standardizes the interface enough that most application code becomes portable, and it makes clear that everything not covered by the interface, model behavior, operational characteristics, jurisdiction, is still a per-provider decision. It reduces integration work; it does not eliminate provider-specific evaluation.

For European teams, the practical version is this. The OpenAI SDK stays. The `base_url` changes. The workload moves. Familiar workflows, chosen production backend, and the infrastructure decision, who operates it, under which jurisdiction, at what latency and cost, gets made on its own terms rather than being welded to the prototype's original provider.

Exoscale's [Concrete AI Dedicated Inference](https://www.exoscale.com/ai-cloud-infrastructure/inference/dedicated/) is one European option for that backend, exposing an OpenAI-compatible endpoint on infrastructure operated by a Swiss-headquartered provider outside US CLOUD Act reach. It is one option among several. What matters is that once the interface is stable, the choice is available at all.
