POST /v1/responses
The OpenAI Responses API, in stateless mode. It's what Codex and other Responses-based tools use. Point the client at https://api.abliteratedllm.dev/v1.
Placeholders:
$API_BASEishttps://api.abliteratedllm.dev/v1,$API_ORIGINishttps://api.abliteratedllm.dev, and$YOUR_KEYis your API key.
Stateless only
We don't store responses, so this endpoint keeps no conversation state between requests:
storeis always set tofalse. A request with"store": truestill succeeds; the response just isn't stored.- A request with a non-null
previous_response_idfails with 400stateless_only. Send the whole conversation ininputinstead. - A request with
"background": truefails with 400stateless_only, because a background response would have to be stored for you to poll. Send the request without it, streaming if it runs long. - There is no endpoint to retrieve, list or delete past responses, because none exist.
Request
curl $API_BASE/responses \
-H "Authorization: Bearer $YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "glm-5.3-flash-abliterated",
"instructions": "You are a concise assistant.",
"input": "Explain what a context window is in two sentences.",
"reasoning": {"effort": "low"},
"max_output_tokens": 2048
}'
For a multi-turn conversation, send the earlier turns as message items:
{
"model": "glm-5.3-flash-abliterated",
"input": [
{ "role": "user", "content": "Name a prime number." },
{ "role": "assistant", "content": "7" },
{ "role": "user", "content": "Now a larger one." }
]
}
Parameters
Fields not listed here are passed to the model unchanged.
| Field | Notes |
|---|---|
model | Required. Any id from GET /v1/models, currently glm-5.3-flash-abliterated, deepseek-v4.1-flash or deepseek-v4-pro. |
input | Required. A string or a list of input items. Text only: input_image, input_audio and file parts fail with 400 unsupported_content, in messages and in tool output (function_call_output) alike. Content nested many levels deep fails with 400 invalid_request. |
instructions | System instructions. |
max_output_tokens | Output budget. Default 16384. Lowered to the model's max output (max_output_tokens in GET /v1/models), and to 4096 on trial accounts. |
reasoning.effort | Passed through. "low", "medium" or "high". |
tools | Function and custom tools ("type": "function" or "custom"), which your client runs. Return each result in the next request's input together with the model's call item: a function_call_output after the function_call, or a custom_tool_call_output after the custom_tool_call. Server-run tool types such as mcp fail with 400 invalid_request. |
n | Only 1. Any other value fails with 400 invalid_request. |
stream | true for server-sent events. Without it, the answer is generated as a stream on our side and returned as one response object when it ends, so a request cut by the time limit or a disconnect is billed for the output generated so far. |
store | Always forced to false. |
previous_response_id | Not supported. Any non-null value returns 400 stateless_only. |
background | Not supported. true returns 400 stateless_only. |
temperature, top_p | Range-checked: temperature 0 to 2, top_p 0 to 1. A value outside its range fails with 400 invalid_request before anything is charged. |
prompt_cache_key | Passed through, to keep a session's requests on a warm prompt cache. |
Streaming
With "stream": true you receive the standard Responses events, starting with response.created, then response.output_text.delta events (and response.function_call_arguments.delta for tool calls), and ending with response.completed. Until the first event, the stream carries an SSE comment line, : ping, every 15 seconds.
Token usage is in response.completed, under response.usage:
{
"input_tokens": 41,
"input_tokens_details": { "cached_tokens": 0 },
"output_tokens": 96
}
Context length
A prompt longer than the model's context window fails with an error. It is never silently truncated.
Billing
input_tokens includes cached tokens, which are billed at the cached-input price:
cost = (input_tokens - cached_tokens) × input price
+ cached_tokens × cached-input price
+ output_tokens × output price
Reasoning tokens count as output tokens. Prices are per 1M tokens and each term is rounded up to the next $0.000001. See GET /v1/models.
Errors
Errors use the OpenAI shape, {"error": {"type", "code", "message"}}. The codes are on the Errors page.