Reference
HTTP endpoints
Every path pooled serve answers, and every status code it returns, in one place.
pooled serve listens on http://127.0.0.1:8080 by default. The OpenAI base URL is http://127.0.0.1:8080/v1; the Anthropic base URL is http://127.0.0.1:8080. For setup, see Serve API.
| Method and path | API | What it does |
|---|---|---|
POST /v1/chat/completions |
OpenAI | Chat Completions, with tools and JSON output, streaming or not. |
POST /v1/responses |
OpenAI | Responses, with function and custom tools, previous_response_id and text.format, streaming or not. |
GET /v1/responses/{id} |
OpenAI | A response this process stored. |
DELETE /v1/responses/{id} |
OpenAI | Deletes a stored response. |
GET /v1/responses/{id}/input_items |
OpenAI | The input items of a stored response. |
POST /v1/messages |
Anthropic | Messages, with tools, tool_choice and thinking, streaming or not. |
GET /v1/models |
both | The room’s model as pooled/<model>, with max_model_len set to the room’s context. Empty until the model is ready. |
GET /v1/models/{id} |
both | One model. 404 for any id but the room’s. |
GET /health |
Status for scripts. Never needs the token. | |
GET / |
The banner, as plain text. |
/v1/models answers in Anthropic’s shape when the request has an anthropic-version header, or an x-api-key header without Authorization. Otherwise it answers in OpenAI’s shape.
Stored responses live in memory only: at most 256 of them or 64 MB, each dropped an hour after its last use.
Not served
Section titled “Not served”These return 404 with a message that says so:
POST /v1/completions(the legacy API; use/v1/chat/completions)POST /v1/embeddingsPOST /v1/messages/count_tokensPOST /v1/responses/input_tokensPOST /v1/responses/compact
A known path with the wrong method gets 405 with an Allow header.
/health
Section titled “/health”curl http://127.0.0.1:8080/health{ "ok": true, "room": "4TKG9P", "connected": true, "ready": true, "model": "pooled/qwen3.6-35b-moe", "ctx": 32768, "queue": 0, "served": 12}| Field | Meaning |
|---|---|
connected |
A link to the host is open and it said hello. |
ready |
The room’s model is loaded and can answer. |
model |
The id /v1/models lists, or null. |
ctx |
The room’s context in tokens, or null if the host did not say. |
queue |
Requests waiting or running, counted here. |
served |
Requests answered since start. |
closed |
Present only when the host disconnected this client or turned API clients off: the reason. |
With a token set, a caller without it gets only {"ok": true}.
Status codes
Section titled “Status codes”Errors come in each API’s own shape: {"error": {...}} for OpenAI paths and {"type": "error", "error": {...}} for Anthropic paths.
| Status (OpenAI / Anthropic) | When | Retry |
|---|---|---|
400 / 400 |
Bad request, an unsupported feature, or a prompt over the room’s context (OpenAI code context_length_exceeded). |
Fix the request. |
401 / 401 |
Missing or wrong key, when the server has a token. | |
403 / 403 |
A Host other than 127.0.0.1:<port> or localhost:<port>, or any Origin header. |
|
404 / 404 |
Unknown path, a path listed above as not served, or an unknown model id. | |
405 / 405 |
Known path, wrong method. See the Allow header. |
|
413 / 413 |
Body over 4 MiB, or the request is over 3.5 MB once packed for the room. | Send less. |
429 / 529 |
The queue here (--max-queue) or in the room is full. Has Retry-After: 5. |
Yes, after Retry-After. |
503 / 529 |
Model not ready, host gone, this client disconnected by the host, or the host pressed Stop. While not connected or not ready, the response has Retry-After: 5. |
Yes, after Retry-After. |
504 / 504 |
The room sent nothing for this request for 5 minutes, or 30 minutes while the host had it queued. | Yes. |
500 / 500 |
Generation failed in the room, or the room broke the protocol. | Yes. |
Once a stream has started, an error arrives as an error chunk (OpenAI, with no [DONE] after it) or an error event (Anthropic).
Limits
Section titled “Limits”Request size, queue and timeout limits are on Limits and context.