OpenAPI Specification
The machine-readable contract of every /v1 endpoint, generated from the running proxy: request schemas come from the exact Pydantic models the server validates with, so they cannot drift from behaviour.
Scope
Only the client-facing /v1 surface is published here. The admin API (/api/*), the MCP proxy (/servers/*), the SPA fallback, and the path aliases (/v1/v1/..., trailing slash) are intentionally excluded. WebSocket transports (WS /v1/responses, WS /v1/realtime) have no OpenAPI representation — see Streaming and the Endpoint Index.
Regenerating
uv run llm-proxy-openapi rewrites docs/public/v1-openapi.json. tests/api/test_openapi_spec.py fails if the committed file is stale, if a /v1 route is missing from this document, or if an alias route leaks in.
The client-facing contract of the proxy: the OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages protocols plus the media endpoints, all served under /v1. Request schemas are generated from the same Pydantic models the server validates with; response schemas are descriptive and permissive, since upstream bodies are passed through. See https://zwldarren.github.io/llm-proxy/api/ for the full reference, including WebSocket and streaming behaviour.
Servers
List models
The model catalogue, filtered by the calling key's allowlist.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Responses
The visible models.
Compact response
Losslessly compact a conversation. Native upstream passthrough is tried first, with a local packing fallback.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Request Body
Responses
The compacted response.
Retrieve response
Retrieve a stored response. Stored responses expire after 24 hours.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Parameters
Path Parameters
Responses
The stored response.
Delete response
Delete a stored response. Deleting an unknown id is a 404, not a 200.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Parameters
Path Parameters
Responses
Deletion confirmation.
Cancel response
Cancel a background response. Only background: true responses still queued/in_progress are cancellable; cancelling twice is idempotent.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Parameters
Path Parameters
Responses
The (possibly cancelled) response.
List input items
List the input items of a stored response.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Parameters
Path Parameters
Query Parameters
100120"asc""desc""desc"Responses
The input items page.
Create response
OpenAI Responses API. background: true returns an in_progress response immediately and requires Redis-backed response storage.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Request Body
Responses
The response object.
List protocols
Registered client protocols with their base paths.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Responses
The registered protocols.
Anthropic Messages
Anthropic Messages API. Aliases /messages and /v1/v1/messages exist.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Request Body
Responses
The message.
Count tokens
Native upstream count when the provider offers one, otherwise a local o200k_base estimate.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Request Body
Responses
Token count.
Create chat completion
OpenAI Chat Completions. Aliases /chat/completions and /v1/v1/chat/completions are served too. Set stream: true for text/event-stream frames; the stream ends with data: [DONE]. See Streaming.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Request Body
Responses
The completion.
Create embeddings
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Request Body
Responses
The embeddings.
Edit image
Accepts either a JSON body or the official multipart/form-data form.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Request Body
Responses
The edited images.
Create image
JSON body. Unlike chat, the image schemas are strict: an unrecognized field returns 400 invalid_request_error.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Request Body
Responses
The generated images.
decisions
Decisions evaluation (OpenAI's /v1/decisions; also served by System One upstreams through the bridge).
Operations
Answer typed questions about shared evidence
Sends shared evidence (input) and typed questions to a decision model and returns one typed answer per question. OpenAI serves this endpoint natively; a model on a System One upstream (typesafe, openrouter, ollama) is bridged: the request is translated to /v1/systemone and the answers translated back.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Request Body
Responses
The answers, one per question.
Create speech
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Request Body
Responses
Audio bytes in the requested response_format.
Create transcription
Multipart upload. Requires model and file.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Request Body
Multipart form. Unknown fields are accepted and forwarded upstream.
Audio file to transcribe. Required.
Transcription model. Required.
ISO-639-1 language hint.
Optional style/vocabulary prompt.
"json""text""srt""verbose_json""vtt""diarized_json"Responses
The transcription.
Create translation
Multipart upload. Requires model and file.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Request Body
Multipart form. Unknown fields are accepted and forwarded upstream.
Audio file to translate. Required.
Translation model. Required.
Optional style/vocabulary prompt.
"json""text""srt""verbose_json""vtt"Responses
The translation.
Evaluate a state with System One
Sends state and typed questions to a System One model such as Jev and returns one typed answer per question. TypeSafe and OpenRouter share the wire format. A model on the openai provider is bridged: its System One request is translated to /v1/decisions and the answers translated back.
Authorizations
API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.
API key sent as x-api-key: sk-… (what the Anthropic SDK sends).
Request Body
Responses
The answers, one per question id.