Skip to content

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​

http://localhost:8080Local proxy (default)

models​

The model catalogue visible to the calling API key.


List models​

GET
/v1/models

The model catalogue, filtered by the calling key's allowlist.

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Responses​

The visible models.

application/json
JSON
{
  
"object": "list",
  
"data": [
  
  
{
  
  
  
"id": "string",
  
  
  
"provider": "string",
  
  
  
"object": "model"
  
  
}
  
]
}

Playground​

Authorization

Samples​


Compact response​

POST
/v1/responses/compact

Losslessly compact a conversation. Native upstream passthrough is tried first, with a local packing fallback.

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Request Body​

application/json
JSON
{
  
"model": "string",
  
"input": "string",
  
"previous_response_id": "string",
  
"instructions": "string",
  
"prompt_cache_key": "string",
  
"tools": [
  
  
{
  
  
  
"type": "function",
  
  
  
"name": "string",
  
  
  
"description": "string",
  
  
  
"parameters": {
  
  
  
  
"additionalProperties": "string"
  
  
  
},
  
  
  
"strict": false
  
  
}
  
],
  
"parallel_tool_calls": true,
  
"reasoning": {
  
  
"effort": "string",
  
  
"mode": "string",
  
  
"context": "string",
  
  
"summary": "string",
  
  
"generate_summary": "string"
  
},
  
"service_tier": "string",
  
"prompt_cache_options": {
  
  
"additionalProperties": "string"
  
},
  
"prompt_cache_retention": "string",
  
"text": {
  
  
"type": "text"
  
}
}

Responses​

The compacted response.

application/json
JSON
{
  
"id": "string",
  
"object": "response",
  
"created_at": 0,
  
"status": "string",
  
"model": "string",
  
"completed_at": 0,
  
"incomplete_details": {
  
  
"reason": "string"
  
},
  
"output": [
  
  
{
  
  
  
"type": "message",
  
  
  
"id": "string",
  
  
  
"status": "string",
  
  
  
"role": "string",
  
  
  
"content": [
  
  
  
  
{
  
  
  
  
  
"type": "output_text",
  
  
  
  
  
"text": "string",
  
  
  
  
  
"annotations": [
  
  
  
  
  
  
{
  
  
  
  
  
  
  
"type": "url_citation",
  
  
  
  
  
  
  
"url": "string",
  
  
  
  
  
  
  
"start_index": 0,
  
  
  
  
  
  
  
"end_index": 0,
  
  
  
  
  
  
  
"title": "string"
  
  
  
  
  
  
}
  
  
  
  
  
],
  
  
  
  
  
"logprobs": [
  
  
  
  
  
  
{
  
  
  
  
  
  
  
"token": "string",
  
  
  
  
  
  
  
"logprob": 0,
  
  
  
  
  
  
  
"bytes": [
  
  
  
  
  
  
  
  
0
  
  
  
  
  
  
  
],
  
  
  
  
  
  
  
"top_logprobs": [
  
  
  
  
  
  
  
  
{
  
  
  
  
  
  
  
  
  
"token": "string",
  
  
  
  
  
  
  
  
  
"logprob": 0,
  
  
  
  
  
  
  
  
  
"bytes": [
  
  
  
  
  
  
  
  
  
  
0
  
  
  
  
  
  
  
  
  
]
  
  
  
  
  
  
  
  
}
  
  
  
  
  
  
  
]
  
  
  
  
  
  
}
  
  
  
  
  
]
  
  
  
  
}
  
  
  
],
  
  
  
"phase": "string"
  
  
}
  
],
  
"error": {
  
  
"code": "string",
  
  
"message": "string",
  
  
"type": "string",
  
  
"param": "string"
  
},
  
"tools": [
  
  
{
  
  
  
"type": "function",
  
  
  
"name": "string",
  
  
  
"description": "string",
  
  
  
"parameters": {
  
  
  
  
"additionalProperties": "string"
  
  
  
},
  
  
  
"strict": false
  
  
}
  
],
  
"tool_choice": "string",
  
"truncation": "string",
  
"parallel_tool_calls": true,
  
"text": {
  
  
"type": "text"
  
},
  
"top_p": 0,
  
"presence_penalty": 0,
  
"frequency_penalty": 0,
  
"top_logprobs": 0,
  
"temperature": 0,
  
"reasoning": {
  
  
"effort": "string",
  
  
"mode": "string",
  
  
"context": "string",
  
  
"summary": "string",
  
  
"generate_summary": "string"
  
},
  
"usage": {
  
  
"input_tokens": 0,
  
  
"output_tokens": 0,
  
  
"total_tokens": 0,
  
  
"input_tokens_details": {
  
  
  
"cached_tokens": 0,
  
  
  
"cache_write_tokens": 0
  
  
},
  
  
"output_tokens_details": {
  
  
  
"reasoning_tokens": 0
  
  
}
  
},
  
"logprobs": {
  
  
"content": [
  
  
  
{
  
  
  
  
"token": "string",
  
  
  
  
"logprob": 0,
  
  
  
  
"bytes": [
  
  
  
  
  
0
  
  
  
  
],
  
  
  
  
"top_logprobs": [
  
  
  
  
  
{
  
  
  
  
  
  
"token": "string",
  
  
  
  
  
  
"logprob": 0,
  
  
  
  
  
  
"bytes": [
  
  
  
  
  
  
  
0
  
  
  
  
  
  
]
  
  
  
  
  
}
  
  
  
  
]
  
  
  
}
  
  
]
  
},
  
"max_output_tokens": 0,
  
"max_tool_calls": 0,
  
"store": true,
  
"background": true,
  
"service_tier": "string",
  
"metadata": {
  
  
"additionalProperties": "string"
  
},
  
"safety_identifier": "string",
  
"prompt_cache_key": "string",
  
"previous_response_id": "string",
  
"instructions": "string",
  
"additionalProperties": "string"
}

Playground​

Authorization
Body

Samples​


Retrieve response​

GET
/v1/responses/{response_id}

Retrieve a stored response. Stored responses expire after 24 hours.

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Parameters​

Path Parameters

response_id*
Type
string
Required

Responses​

The stored response.

application/json
JSON
{
  
"id": "string",
  
"object": "response",
  
"created_at": 0,
  
"status": "string",
  
"model": "string",
  
"completed_at": 0,
  
"incomplete_details": {
  
  
"reason": "string"
  
},
  
"output": [
  
  
{
  
  
  
"type": "message",
  
  
  
"id": "string",
  
  
  
"status": "string",
  
  
  
"role": "string",
  
  
  
"content": [
  
  
  
  
{
  
  
  
  
  
"type": "output_text",
  
  
  
  
  
"text": "string",
  
  
  
  
  
"annotations": [
  
  
  
  
  
  
{
  
  
  
  
  
  
  
"type": "url_citation",
  
  
  
  
  
  
  
"url": "string",
  
  
  
  
  
  
  
"start_index": 0,
  
  
  
  
  
  
  
"end_index": 0,
  
  
  
  
  
  
  
"title": "string"
  
  
  
  
  
  
}
  
  
  
  
  
],
  
  
  
  
  
"logprobs": [
  
  
  
  
  
  
{
  
  
  
  
  
  
  
"token": "string",
  
  
  
  
  
  
  
"logprob": 0,
  
  
  
  
  
  
  
"bytes": [
  
  
  
  
  
  
  
  
0
  
  
  
  
  
  
  
],
  
  
  
  
  
  
  
"top_logprobs": [
  
  
  
  
  
  
  
  
{
  
  
  
  
  
  
  
  
  
"token": "string",
  
  
  
  
  
  
  
  
  
"logprob": 0,
  
  
  
  
  
  
  
  
  
"bytes": [
  
  
  
  
  
  
  
  
  
  
0
  
  
  
  
  
  
  
  
  
]
  
  
  
  
  
  
  
  
}
  
  
  
  
  
  
  
]
  
  
  
  
  
  
}
  
  
  
  
  
]
  
  
  
  
}
  
  
  
],
  
  
  
"phase": "string"
  
  
}
  
],
  
"error": {
  
  
"code": "string",
  
  
"message": "string",
  
  
"type": "string",
  
  
"param": "string"
  
},
  
"tools": [
  
  
{
  
  
  
"type": "function",
  
  
  
"name": "string",
  
  
  
"description": "string",
  
  
  
"parameters": {
  
  
  
  
"additionalProperties": "string"
  
  
  
},
  
  
  
"strict": false
  
  
}
  
],
  
"tool_choice": "string",
  
"truncation": "string",
  
"parallel_tool_calls": true,
  
"text": {
  
  
"type": "text"
  
},
  
"top_p": 0,
  
"presence_penalty": 0,
  
"frequency_penalty": 0,
  
"top_logprobs": 0,
  
"temperature": 0,
  
"reasoning": {
  
  
"effort": "string",
  
  
"mode": "string",
  
  
"context": "string",
  
  
"summary": "string",
  
  
"generate_summary": "string"
  
},
  
"usage": {
  
  
"input_tokens": 0,
  
  
"output_tokens": 0,
  
  
"total_tokens": 0,
  
  
"input_tokens_details": {
  
  
  
"cached_tokens": 0,
  
  
  
"cache_write_tokens": 0
  
  
},
  
  
"output_tokens_details": {
  
  
  
"reasoning_tokens": 0
  
  
}
  
},
  
"logprobs": {
  
  
"content": [
  
  
  
{
  
  
  
  
"token": "string",
  
  
  
  
"logprob": 0,
  
  
  
  
"bytes": [
  
  
  
  
  
0
  
  
  
  
],
  
  
  
  
"top_logprobs": [
  
  
  
  
  
{
  
  
  
  
  
  
"token": "string",
  
  
  
  
  
  
"logprob": 0,
  
  
  
  
  
  
"bytes": [
  
  
  
  
  
  
  
0
  
  
  
  
  
  
]
  
  
  
  
  
}
  
  
  
  
]
  
  
  
}
  
  
]
  
},
  
"max_output_tokens": 0,
  
"max_tool_calls": 0,
  
"store": true,
  
"background": true,
  
"service_tier": "string",
  
"metadata": {
  
  
"additionalProperties": "string"
  
},
  
"safety_identifier": "string",
  
"prompt_cache_key": "string",
  
"previous_response_id": "string",
  
"instructions": "string",
  
"additionalProperties": "string"
}

Playground​

Authorization
Variables
Key
Value

Samples​


Delete response​

DELETE
/v1/responses/{response_id}

Delete a stored response. Deleting an unknown id is a 404, not a 200.

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Parameters​

Path Parameters

response_id*
Type
string
Required

Responses​

Deletion confirmation.

application/json
JSON
{
  
"id": "string",
  
"object": "response.deleted",
  
"deleted": true,
  
"additionalProperties": "string"
}

Playground​

Authorization
Variables
Key
Value

Samples​


Cancel response​

POST
/v1/responses/{response_id}/cancel

Cancel a background response. Only background: true responses still queued/in_progress are cancellable; cancelling twice is idempotent.

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Parameters​

Path Parameters

response_id*
Type
string
Required

Responses​

The (possibly cancelled) response.

application/json
JSON
{
  
"id": "string",
  
"object": "response",
  
"created_at": 0,
  
"status": "string",
  
"model": "string",
  
"completed_at": 0,
  
"incomplete_details": {
  
  
"reason": "string"
  
},
  
"output": [
  
  
{
  
  
  
"type": "message",
  
  
  
"id": "string",
  
  
  
"status": "string",
  
  
  
"role": "string",
  
  
  
"content": [
  
  
  
  
{
  
  
  
  
  
"type": "output_text",
  
  
  
  
  
"text": "string",
  
  
  
  
  
"annotations": [
  
  
  
  
  
  
{
  
  
  
  
  
  
  
"type": "url_citation",
  
  
  
  
  
  
  
"url": "string",
  
  
  
  
  
  
  
"start_index": 0,
  
  
  
  
  
  
  
"end_index": 0,
  
  
  
  
  
  
  
"title": "string"
  
  
  
  
  
  
}
  
  
  
  
  
],
  
  
  
  
  
"logprobs": [
  
  
  
  
  
  
{
  
  
  
  
  
  
  
"token": "string",
  
  
  
  
  
  
  
"logprob": 0,
  
  
  
  
  
  
  
"bytes": [
  
  
  
  
  
  
  
  
0
  
  
  
  
  
  
  
],
  
  
  
  
  
  
  
"top_logprobs": [
  
  
  
  
  
  
  
  
{
  
  
  
  
  
  
  
  
  
"token": "string",
  
  
  
  
  
  
  
  
  
"logprob": 0,
  
  
  
  
  
  
  
  
  
"bytes": [
  
  
  
  
  
  
  
  
  
  
0
  
  
  
  
  
  
  
  
  
]
  
  
  
  
  
  
  
  
}
  
  
  
  
  
  
  
]
  
  
  
  
  
  
}
  
  
  
  
  
]
  
  
  
  
}
  
  
  
],
  
  
  
"phase": "string"
  
  
}
  
],
  
"error": {
  
  
"code": "string",
  
  
"message": "string",
  
  
"type": "string",
  
  
"param": "string"
  
},
  
"tools": [
  
  
{
  
  
  
"type": "function",
  
  
  
"name": "string",
  
  
  
"description": "string",
  
  
  
"parameters": {
  
  
  
  
"additionalProperties": "string"
  
  
  
},
  
  
  
"strict": false
  
  
}
  
],
  
"tool_choice": "string",
  
"truncation": "string",
  
"parallel_tool_calls": true,
  
"text": {
  
  
"type": "text"
  
},
  
"top_p": 0,
  
"presence_penalty": 0,
  
"frequency_penalty": 0,
  
"top_logprobs": 0,
  
"temperature": 0,
  
"reasoning": {
  
  
"effort": "string",
  
  
"mode": "string",
  
  
"context": "string",
  
  
"summary": "string",
  
  
"generate_summary": "string"
  
},
  
"usage": {
  
  
"input_tokens": 0,
  
  
"output_tokens": 0,
  
  
"total_tokens": 0,
  
  
"input_tokens_details": {
  
  
  
"cached_tokens": 0,
  
  
  
"cache_write_tokens": 0
  
  
},
  
  
"output_tokens_details": {
  
  
  
"reasoning_tokens": 0
  
  
}
  
},
  
"logprobs": {
  
  
"content": [
  
  
  
{
  
  
  
  
"token": "string",
  
  
  
  
"logprob": 0,
  
  
  
  
"bytes": [
  
  
  
  
  
0
  
  
  
  
],
  
  
  
  
"top_logprobs": [
  
  
  
  
  
{
  
  
  
  
  
  
"token": "string",
  
  
  
  
  
  
"logprob": 0,
  
  
  
  
  
  
"bytes": [
  
  
  
  
  
  
  
0
  
  
  
  
  
  
]
  
  
  
  
  
}
  
  
  
  
]
  
  
  
}
  
  
]
  
},
  
"max_output_tokens": 0,
  
"max_tool_calls": 0,
  
"store": true,
  
"background": true,
  
"service_tier": "string",
  
"metadata": {
  
  
"additionalProperties": "string"
  
},
  
"safety_identifier": "string",
  
"prompt_cache_key": "string",
  
"previous_response_id": "string",
  
"instructions": "string",
  
"additionalProperties": "string"
}

Playground​

Authorization
Variables
Key
Value

Samples​


List input items​

GET
/v1/responses/{response_id}/input_items

List the input items of a stored response.

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Parameters​

Path Parameters

response_id*
Type
string
Required

Query Parameters

limit
Type
integer
Maximum
100
Minimum
1
Default
20
order
Type
string
Valid values
"asc""desc"
Default
"desc"
after
include

Responses​

The input items page.

application/json
JSON
{
  
"object": "string",
  
"data": [
  
  
{
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"first_id": "string",
  
"last_id": "string",
  
"has_more": true,
  
"additionalProperties": "string"
}

Playground​

Authorization
Variables
Key
Value

Samples​


Create response​

POST
/v1/responses

OpenAI Responses API. background: true returns an in_progress response immediately and requires Redis-backed response storage.

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Request Body​

application/json
JSON
{
  
"model": "string",
  
"input": "string",
  
"previous_response_id": "string",
  
"conversation": "string",
  
"prompt": {
  
  
"additionalProperties": "string"
  
},
  
"include": [
  
  
"string"
  
],
  
"tools": [
  
  
{
  
  
  
"type": "function",
  
  
  
"name": "string",
  
  
  
"description": "string",
  
  
  
"parameters": {
  
  
  
  
"additionalProperties": "string"
  
  
  
},
  
  
  
"strict": false
  
  
}
  
],
  
"tool_choice": "string",
  
"metadata": {
  
  
"additionalProperties": "string"
  
},
  
"text": {
  
  
"type": "text"
  
},
  
"temperature": 0,
  
"top_p": 0,
  
"presence_penalty": 0,
  
"frequency_penalty": 0,
  
"parallel_tool_calls": true,
  
"stream": false,
  
"stream_options": {
  
  
"include_obfuscation": true
  
},
  
"background": true,
  
"max_output_tokens": 0,
  
"max_tool_calls": 0,
  
"reasoning": {
  
  
"effort": "string",
  
  
"mode": "string",
  
  
"context": "string",
  
  
"summary": "string",
  
  
"generate_summary": "string"
  
},
  
"safety_identifier": "string",
  
"prompt_cache_key": "string",
  
"truncation": "string",
  
"instructions": "string",
  
"store": true,
  
"service_tier": "string",
  
"top_logprobs": 0,
  
"additionalProperties": "string"
}

Responses​

The response object.

JSON
{
  
"id": "string",
  
"object": "response",
  
"created_at": 0,
  
"status": "string",
  
"model": "string",
  
"completed_at": 0,
  
"incomplete_details": {
  
  
"reason": "string"
  
},
  
"output": [
  
  
{
  
  
  
"type": "message",
  
  
  
"id": "string",
  
  
  
"status": "string",
  
  
  
"role": "string",
  
  
  
"content": [
  
  
  
  
{
  
  
  
  
  
"type": "output_text",
  
  
  
  
  
"text": "string",
  
  
  
  
  
"annotations": [
  
  
  
  
  
  
{
  
  
  
  
  
  
  
"type": "url_citation",
  
  
  
  
  
  
  
"url": "string",
  
  
  
  
  
  
  
"start_index": 0,
  
  
  
  
  
  
  
"end_index": 0,
  
  
  
  
  
  
  
"title": "string"
  
  
  
  
  
  
}
  
  
  
  
  
],
  
  
  
  
  
"logprobs": [
  
  
  
  
  
  
{
  
  
  
  
  
  
  
"token": "string",
  
  
  
  
  
  
  
"logprob": 0,
  
  
  
  
  
  
  
"bytes": [
  
  
  
  
  
  
  
  
0
  
  
  
  
  
  
  
],
  
  
  
  
  
  
  
"top_logprobs": [
  
  
  
  
  
  
  
  
{
  
  
  
  
  
  
  
  
  
"token": "string",
  
  
  
  
  
  
  
  
  
"logprob": 0,
  
  
  
  
  
  
  
  
  
"bytes": [
  
  
  
  
  
  
  
  
  
  
0
  
  
  
  
  
  
  
  
  
]
  
  
  
  
  
  
  
  
}
  
  
  
  
  
  
  
]
  
  
  
  
  
  
}
  
  
  
  
  
]
  
  
  
  
}
  
  
  
],
  
  
  
"phase": "string"
  
  
}
  
],
  
"error": {
  
  
"code": "string",
  
  
"message": "string",
  
  
"type": "string",
  
  
"param": "string"
  
},
  
"tools": [
  
  
{
  
  
  
"type": "function",
  
  
  
"name": "string",
  
  
  
"description": "string",
  
  
  
"parameters": {
  
  
  
  
"additionalProperties": "string"
  
  
  
},
  
  
  
"strict": false
  
  
}
  
],
  
"tool_choice": "string",
  
"truncation": "string",
  
"parallel_tool_calls": true,
  
"text": {
  
  
"type": "text"
  
},
  
"top_p": 0,
  
"presence_penalty": 0,
  
"frequency_penalty": 0,
  
"top_logprobs": 0,
  
"temperature": 0,
  
"reasoning": {
  
  
"effort": "string",
  
  
"mode": "string",
  
  
"context": "string",
  
  
"summary": "string",
  
  
"generate_summary": "string"
  
},
  
"usage": {
  
  
"input_tokens": 0,
  
  
"output_tokens": 0,
  
  
"total_tokens": 0,
  
  
"input_tokens_details": {
  
  
  
"cached_tokens": 0,
  
  
  
"cache_write_tokens": 0
  
  
},
  
  
"output_tokens_details": {
  
  
  
"reasoning_tokens": 0
  
  
}
  
},
  
"logprobs": {
  
  
"content": [
  
  
  
{
  
  
  
  
"token": "string",
  
  
  
  
"logprob": 0,
  
  
  
  
"bytes": [
  
  
  
  
  
0
  
  
  
  
],
  
  
  
  
"top_logprobs": [
  
  
  
  
  
{
  
  
  
  
  
  
"token": "string",
  
  
  
  
  
  
"logprob": 0,
  
  
  
  
  
  
"bytes": [
  
  
  
  
  
  
  
0
  
  
  
  
  
  
]
  
  
  
  
  
}
  
  
  
  
]
  
  
  
}
  
  
]
  
},
  
"max_output_tokens": 0,
  
"max_tool_calls": 0,
  
"store": true,
  
"background": true,
  
"service_tier": "string",
  
"metadata": {
  
  
"additionalProperties": "string"
  
},
  
"safety_identifier": "string",
  
"prompt_cache_key": "string",
  
"previous_response_id": "string",
  
"instructions": "string",
  
"additionalProperties": "string"
}

Playground​

Authorization
Body

Samples​


protocols​

Protocol introspection.


List protocols​

GET
/v1/protocols

Registered client protocols with their base paths.

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Responses​

The registered protocols.

application/json
JSON
{
  
"protocols": [
  
  
{
  
  
  
"name": "string",
  
  
  
"path": "string",
  
  
  
"description": "string",
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"additionalProperties": "string"
}

Playground​

Authorization

Samples​


chat​

Chat Completions and Anthropic Messages wire protocols.


Anthropic Messages​

POST
/v1/messages

Anthropic Messages API. Aliases /messages and /v1/v1/messages exist.

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Request Body​

application/json
JSON
{
  
"model": "string",
  
"max_tokens": 16384,
  
"messages": [
  
  
{
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"system": "string",
  
"stop_sequences": [
  
  
"string"
  
],
  
"stream": false,
  
"temperature": 0,
  
"top_p": 0,
  
"top_k": 0,
  
"tools": [
  
  
{
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"tool_choice": {
  
  
"type": "auto",
  
  
"name": "string",
  
  
"disable_parallel_tool_use": true
  
},
  
"metadata": {
  
  
"additionalProperties": "string"
  
},
  
"thinking": {
  
  
"additionalProperties": "string"
  
},
  
"cache_control": {
  
  
"additionalProperties": "string"
  
},
  
"container": "string",
  
"inference_geo": "string",
  
"service_tier": "string",
  
"output_config": {
  
  
"additionalProperties": "string"
  
},
  
"additionalProperties": "string"
}

Responses​

The message.

JSON
{
  
"id": "string",
  
"type": "message",
  
"role": "assistant",
  
"model": "string",
  
"content": [
  
  
{
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"stop_reason": "string",
  
"stop_sequence": "string",
  
"usage": {
  
  
"input_tokens": 0,
  
  
"output_tokens": 0,
  
  
"cache_creation_input_tokens": 0,
  
  
"cache_read_input_tokens": 0,
  
  
"additionalProperties": "string"
  
},
  
"additionalProperties": "string"
}

Playground​

Authorization
Body

Samples​


Count tokens​

POST
/v1/messages/count_tokens

Native upstream count when the provider offers one, otherwise a local o200k_base estimate.

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Request Body​

application/json
JSON
{
  
"model": "string",
  
"messages": [
  
  
{
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"system": "string",
  
"tools": [
  
  
{
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"tool_choice": {
  
  
"type": "auto",
  
  
"name": "string",
  
  
"disable_parallel_tool_use": true
  
},
  
"thinking": {
  
  
"additionalProperties": "string"
  
},
  
"cache_control": {
  
  
"additionalProperties": "string"
  
},
  
"additionalProperties": "string"
}

Responses​

Token count.

application/json
JSON
{
  
"input_tokens": 0
}

Playground​

Authorization
Body

Samples​


Create chat completion​

POST
/v1/chat/completions

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​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Request Body​

application/json
JSON
{
  
"model": "string",
  
"messages": [
  
  
{
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"temperature": 0,
  
"top_p": 0,
  
"max_tokens": 0,
  
"max_completion_tokens": 0,
  
"n": 0,
  
"stream": false,
  
"stream_options": {
  
  
"additionalProperties": "string"
  
},
  
"stop": [
  
  
"string"
  
],
  
"presence_penalty": 0,
  
"frequency_penalty": 0,
  
"logit_bias": {
  
  
"additionalProperties": 0
  
},
  
"logprobs": true,
  
"top_logprobs": 0,
  
"user": "string",
  
"response_format": {
  
  
"additionalProperties": "string"
  
},
  
"seed": 0,
  
"tools": [
  
  
{
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"tool_choice": "string",
  
"parallel_tool_calls": true,
  
"thinking": {
  
  
"additionalProperties": "string"
  
},
  
"audio": {
  
  
"additionalProperties": "string"
  
},
  
"modalities": [
  
  
"string"
  
],
  
"reasoning_effort": "string",
  
"prediction": {
  
  
"additionalProperties": "string"
  
},
  
"web_search_options": {
  
  
"additionalProperties": "string"
  
},
  
"service_tier": "string",
  
"verbosity": "string",
  
"store": true,
  
"metadata": {
  
  
"additionalProperties": "string"
  
},
  
"prompt_cache_key": "string",
  
"prompt_cache_retention": "string",
  
"safety_identifier": "string",
  
"additionalProperties": "string"
}

Responses​

The completion.

JSON
{
  
"id": "string",
  
"object": "chat.completion",
  
"created": 0,
  
"model": "string",
  
"choices": [
  
  
{
  
  
  
"index": 0,
  
  
  
"message": {
  
  
  
  
"role": "string",
  
  
  
  
"content": "string",
  
  
  
  
"tool_calls": [
  
  
  
  
  
{
  
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
  
}
  
  
  
  
],
  
  
  
  
"reasoning_content": "string",
  
  
  
  
"reasoning_signature": "string",
  
  
  
  
"encrypted_content": "string",
  
  
  
  
"reasoning_segments": [
  
  
  
  
  
{
  
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
  
}
  
  
  
  
],
  
  
  
  
"refusal": "string",
  
  
  
  
"audio": {
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
},
  
  
  
  
"annotations": [
  
  
  
  
  
{
  
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
  
}
  
  
  
  
],
  
  
  
  
"additionalProperties": "string"
  
  
  
},
  
  
  
"delta": {
  
  
  
  
"role": "string",
  
  
  
  
"content": "string",
  
  
  
  
"tool_calls": [
  
  
  
  
  
{
  
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
  
}
  
  
  
  
],
  
  
  
  
"reasoning_content": "string",
  
  
  
  
"reasoning_signature": "string",
  
  
  
  
"encrypted_content": "string",
  
  
  
  
"reasoning_segments": [
  
  
  
  
  
{
  
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
  
}
  
  
  
  
],
  
  
  
  
"refusal": "string",
  
  
  
  
"audio": {
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
},
  
  
  
  
"annotations": [
  
  
  
  
  
{
  
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
  
}
  
  
  
  
],
  
  
  
  
"additionalProperties": "string"
  
  
  
},
  
  
  
"finish_reason": "string",
  
  
  
"logprobs": {
  
  
  
  
"additionalProperties": "string"
  
  
  
},
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"usage": {
  
  
"input_tokens": 0,
  
  
"output_tokens": 0,
  
  
"total_tokens": 0,
  
  
"input_tokens_details": {
  
  
  
"cached_tokens": 0,
  
  
  
"cache_write_tokens": 0
  
  
},
  
  
"output_tokens_details": {
  
  
  
"reasoning_tokens": 0
  
  
}
  
},
  
"system_fingerprint": "string",
  
"service_tier": "string",
  
"additionalProperties": "string"
}

Playground​

Authorization
Body

Samples​


embeddings​

Text embeddings.


Create embeddings​

POST
/v1/embeddings

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Request Body​

application/json
JSON
{
  
"model": "string",
  
"input": "string",
  
"encoding_format": "float",
  
"dimensions": 0,
  
"user": "string",
  
"additionalProperties": "string"
}

Responses​

The embeddings.

application/json
JSON
{
  
"object": "list",
  
"data": [
  
  
{
  
  
  
"object": "embedding",
  
  
  
"embedding": [
  
  
  
  
0
  
  
  
],
  
  
  
"index": 0,
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"model": "string",
  
"usage": {
  
  
"prompt_tokens": 0,
  
  
"total_tokens": 0,
  
  
"additionalProperties": "string"
  
},
  
"additionalProperties": "string"
}

Playground​

Authorization
Body

Samples​


images​

Image generation and editing.


Edit image​

POST
/v1/images/edits

Accepts either a JSON body or the official multipart/form-data form.

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Request Body​

JSON
{
  
"prompt": "string",
  
"model": null,
  
"images": [
  
  
{
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"mask": {
  
  
"additionalProperties": "string"
  
},
  
"background": null,
  
"input_fidelity": null,
  
"moderation": null,
  
"n": null,
  
"output_compression": null,
  
"output_format": null,
  
"partial_images": null,
  
"quality": null,
  
"size": null,
  
"response_format": null,
  
"stream": null,
  
"user": null,
  
"additionalProperties": "string"
}

Responses​

The edited images.

application/json
JSON
{
  
"created": 0,
  
"data": [
  
  
{
  
  
  
"url": "string",
  
  
  
"b64_json": "string",
  
  
  
"revised_prompt": "string",
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"background": "string",
  
"output_format": "string",
  
"quality": "string",
  
"size": "string",
  
"usage": {
  
  
"additionalProperties": "string"
  
},
  
"additionalProperties": "string"
}

Playground​

Authorization
Body

Samples​


Create image​

POST
/v1/images/generations

JSON body. Unlike chat, the image schemas are strict: an unrecognized field returns 400 invalid_request_error.

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Request Body​

application/json
JSON
{
  
"prompt": "string",
  
"model": null,
  
"n": null,
  
"quality": null,
  
"response_format": null,
  
"size": null,
  
"style": null,
  
"user": null,
  
"background": null,
  
"moderation": null,
  
"output_format": null,
  
"output_compression": null,
  
"partial_images": null,
  
"stream": null,
  
"additionalProperties": "string"
}

Responses​

The generated images.

application/json
JSON
{
  
"created": 0,
  
"data": [
  
  
{
  
  
  
"url": "string",
  
  
  
"b64_json": "string",
  
  
  
"revised_prompt": "string",
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"background": "string",
  
"output_format": "string",
  
"quality": "string",
  
"size": "string",
  
"usage": {
  
  
"additionalProperties": "string"
  
},
  
"additionalProperties": "string"
}

Playground​

Authorization
Body

Samples​


decisions​

Decisions evaluation (OpenAI's /v1/decisions; also served by System One upstreams through the bridge).


Answer typed questions about shared evidence​

POST
/v1/decisions

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​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Request Body​

application/json
JSON
{
  
"input": "string",
  
"model": "string",
  
"questions": [
  
  
{
  
  
  
"type": "string",
  
  
  
"instructions": "string",
  
  
  
"name": "string",
  
  
  
"choices": [
  
  
  
  
{
  
  
  
  
  
"value": "string",
  
  
  
  
  
"description": "string",
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
}
  
  
  
],
  
  
  
"levels": [
  
  
  
  
{
  
  
  
  
  
"label": "string",
  
  
  
  
  
"description": "string",
  
  
  
  
  
"additionalProperties": "string"
  
  
  
  
}
  
  
  
],
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"safety_identifier": "string"
}

Responses​

The answers, one per question.

application/json
JSON
{
  
"model": "string",
  
"answers": [
  
  
{
  
  
  
"type": "string",
  
  
  
"name": "string",
  
  
  
"probability": 0,
  
  
  
"choice": "string",
  
  
  
"score": 0,
  
  
  
"confidence": 0,
  
  
  
"probabilities": {
  
  
  
  
"additionalProperties": "string"
  
  
  
},
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"usage": {
  
  
"input_tokens": 0,
  
  
"input_tokens_details": {
  
  
  
"cache_write_tokens": 0,
  
  
  
"cached_tokens": 0,
  
  
  
"additionalProperties": "string"
  
  
},
  
  
"output_tokens": 0,
  
  
"output_tokens_details": {
  
  
  
"reasoning_tokens": 0,
  
  
  
"additionalProperties": "string"
  
  
},
  
  
"total_tokens": 0,
  
  
"additionalProperties": "string"
  
},
  
"additionalProperties": "string"
}

Playground​

Authorization
Body

Samples​


audio​

Speech synthesis, transcription, and translation.


Create speech​

POST
/v1/audio/speech

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Request Body​

application/json
JSON
{
  
"model": "string",
  
"input": "string",
  
"voice": "string",
  
"instructions": "string",
  
"response_format": "mp3",
  
"speed": 1,
  
"stream_format": "string",
  
"stream": false,
  
"additionalProperties": "string"
}

Responses​

Audio bytes in the requested response_format.

application/octet-stream

Playground​

Authorization
Body

Samples​


Create transcription​

POST
/v1/audio/transcriptions

Multipart upload. Requires model and file.

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Request Body​

multipart/form-data

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.

Valid values"json""text""srt""verbose_json""vtt""diarized_json"

Responses​

The transcription.

application/json
JSON
{
  
"text": "string",
  
"task": "string",
  
"language": "string",
  
"duration": 0,
  
"segments": [
  
  
{
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"words": [
  
  
{
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"logprobs": [
  
  
{
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"usage": {
  
  
"additionalProperties": "string"
  
},
  
"additionalProperties": "string"
}

Playground​

Authorization
Body

Samples​


Create translation​

POST
/v1/audio/translations

Multipart upload. Requires model and file.

Authorizations​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Request Body​

multipart/form-data

Multipart form. Unknown fields are accepted and forwarded upstream.

Audio file to translate. Required.

Translation model. Required.

Optional style/vocabulary prompt.

Valid values"json""text""srt""verbose_json""vtt"

Responses​

The translation.

application/json
JSON
{
  
"text": "string",
  
"task": "string",
  
"language": "string",
  
"duration": 0,
  
"segments": [
  
  
{
  
  
  
"additionalProperties": "string"
  
  
}
  
],
  
"usage": {
  
  
"additionalProperties": "string"
  
},
  
"additionalProperties": "string"
}

Playground​

Authorization
Body

Samples​


systemone​

System One evaluation (TypeSafe's Jev; also OpenRouter and Ollama).


Evaluate a state with System One​

POST
/v1/systemone

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​

ApiKeyBearer

API key sent as Authorization: Bearer sk-…. This is what every OpenAI SDK sends by default. Console JWTs are not accepted on /v1/*.

Type
HTTP (bearer)
or
ApiKeyHeader

API key sent as x-api-key: sk-… (what the Anthropic SDK sends).

Type
API Key (header: x-api-key)

Request Body​

application/json
JSON
{
  
"state": "string",
  
"model": "string",
  
"questions": {
  
  
"additionalProperties": {
  
  
  
"type": "string",
  
  
  
"instructions": "string",
  
  
  
"criteria": {
  
  
  
  
"additionalProperties": "string"
  
  
  
},
  
  
  
"additionalProperties": "string"
  
  
}
  
},
  
"images": [
  
  
"string"
  
],
  
"keep_alive": "string",
  
"provider": {
  
  
"additionalProperties": "string"
  
},
  
"session_id": "string",
  
"trace": {
  
  
"additionalProperties": "string"
  
},
  
"user": "string"
}

Responses​

The answers, one per question id.

application/json
JSON
{
  
"model": "string",
  
"answers": {
  
  
"additionalProperties": "string"
  
},
  
"usage": {
  
  
"input_tokens": 0,
  
  
"output_tokens": 0,
  
  
"cost": 0,
  
  
"additionalProperties": "string"
  
},
  
"id": "string",
  
"provider": "string",
  
"additionalProperties": "string"
}

Playground​

Authorization
Body

Samples​


MIT licensed