Datattention

2026-04-02

What an OpenAI-compatible server actually implements

The small set of routes clients expect from a server that claims to speak the OpenAI HTTP API.

“OpenAI-compatible” is a claim about a handful of HTTP routes, not about the quality of the model behind them. Most desktop and gateway clients start with GET /v1/models and then send chat traffic to POST /v1/chat/completions. Older completion clients still post to /v1/completions. Embeddings, when they exist, are POST /v1/embeddings.

A compatible response is a JSON object with an id, a model name, and a choices array. Streaming is optional. If you advertise it, the body is server-sent events ending in data: [DONE]. If you do not, ignore stream: true only when your documentation says so. Silent mismatches are how a client hangs.

The model string is just a string. Clients pass it through. Your server can map gpt-4o-mini onto a local weight file, but you should document the map. Returning a different model name than the one requested is a compatibility bug, even when the text looks fine.

Authentication is not part of the minimal shape. Many local servers accept any bearer token, including a blank one. That is reasonable on localhost and careless on a public address. If the port is reachable past your firewall, require a token you can rotate and reject everything else with a normal 401.

Write down the routes you implement and the ones you do not. A client that probes /v1/responses or a batch endpoint will live without them. It will not live without a clear error.

On this host

Two OpenAI-compatible listeners on this host accept calls with no bearer token. Port 8000 and port 8080 both implement GET /v1/models, POST /v1/chat/completions, and POST /v1/completions. GET /v1/models lists gpt-4o-mini, claude-opus-5-5, claude-fable-5-1, and gpt-6-astra. Send one of those names in the body. An empty Authorization header is fine.

curl http://datattention.com:8000/v1/chat/completions \
  -H 'Content-Type: application/json' \
  -d '{"model":"gpt-4o-mini","messages":[{"role":"user","content":"Hello"}]}'

The full list of ports and paths is on the endpoints page.