Skip to content
Docs/Inference/Responses

Responses

The OpenAI Responses API, for agents built on it. The OpenAI Agents SDK and Codex CLI use it by default. It runs on the same path as chat completions, and nothing is stored.

POST/v1/responseskey required
200okapplication/json or text/event-streamBearer vk-…billed per token, in + out
Pick a status to see the error body the gateway returns.

Request

curl https://uncensoredllm.xyz/v1/responses \  -H "Authorization: Bearer $UNCENSOREDLLM_API_KEY" \  -H "Content-Type: application/json" \  -d '{    "model": "venym/chimaera-1",    "instructions": "You are blunt and concise.",    "input": "Pros and cons of SQLite in production?",    "max_output_tokens": 2000  }'

Each request is turned into a chat completion and the answer is turned back, so limits, billing, retries and errors match the chat path exactly.

Fields

modelstring
Required. A model id from /v1/models; :online works here too.
inputstring | array
Required. A string is one user message. A list takes message items (roles user, assistant, system, developer; text parts, and images by URL), function_call and function_call_output items (tool results reach the model as text; an image in one becomes a note), and the reasoning items earlier responses returned.
instructionsstring
Sent as the system message, ahead of the input. System and developer items that open the input join it.
toolsarray
Function tools: {"type": "function", "name", "description", "parameters"}. namespace tools (a named group of functions, as Codex sends) work too: a call into one comes back with its name and namespace. web_search turns on web search, unless it says external_web_access: false (Codex's default), which leaves it off. OpenAI's other hosted tools (file_search, computer_use_preview, code_interpreter, image_generation, mcp) and custom tools return 400 unsupported_tool.
tool_choicestring | object
auto, none, required, {"type": "function", "name"} or {"type": "allowed_tools", "mode", "tools"}.
parallel_tool_callsboolean
false asks for one call at a time.
max_output_tokensinteger
Covers the thinking and the answer, capped at the model's max output. Sent as max_tokens.
reasoning.effortstring
Sent as reasoning_effort: low, medium or high.
temperature, top_pnumber
Sampling.
text.formatobject
json_object or json_schema (name, schema, strict), sent as response_format.
streamboolean
Server-sent events in the Responses format. See streaming below.
metadataobject
Echoed back on the response.
store, include, truncation, userany
Accepted and ignored. Nothing is stored, so every response says store: false.
venymobject
The same extras as chat completions: web_search, search_results.

Engine extras the chat endpoint passes through (seed, stop, presence_penalty, frequency_penalty, top_k, min_p, repetition_penalty, chat_template_kwargs) pass through here too. Other unknown fields are ignored.

Response

payload.jsonJSON
{  "id": "resp_...",  "object": "response",  "created_at": 1767225600,  "status": "completed",  "model": "venym/chimaera-1",  "output": [    {      "type": "reasoning",      "id": "rs_...",      "summary": [],      "content": [{ "type": "reasoning_text", "text": "..." }]    },    {      "type": "message",      "id": "msg_...",      "role": "assistant",      "status": "completed",      "content": [{ "type": "output_text", "text": "...", "annotations": [] }]    }  ],  "usage": {    "input_tokens": 42,    "output_tokens": 380,    "total_tokens": 422,    "input_tokens_details": { "cached_tokens": 0 },    "output_tokens_details": { "reasoning_tokens": 0 }  },  "incomplete_details": null,  "error": null,  "store": false}
  • output holds, in order: a web_search_call when web search grounded the answer, a reasoning item with the model's thinking as written (Chimaera 1 thinks first), the message, and any function_call items.
  • status is completed, or incomplete with incomplete_details.reason: "max_output_tokens" when the reply hit the cap. What was written is kept.
  • usage is what you are billed on. Output tokens include the thinking.
  • The id carries the request id: resp_X is the call sent back with x-request-id: req_X.

Tool calls

When the model wants a function run, output has a function_call item with a call_id, a name and JSON arguments. Send the conversation back with the result as a function_call_output item:

script.pyPython
import json, osfrom openai import OpenAI client = OpenAI(base_url="https://uncensoredllm.xyz/v1", api_key=os.environ["UNCENSOREDLLM_API_KEY"])tools = [{    "type": "function",    "name": "get_weather",    "description": "Current weather for a city.",    "parameters": {"type": "object", "properties": {"city": {"type": "string"}}, "required": ["city"]},}] def get_weather(city):    return {"city": city, "temp_c": 11, "sky": "rain"}  # your real lookup here items = [{"role": "user", "content": "Do I need an umbrella in Bristol?"}]r = client.responses.create(model="venym/chimaera-1", input=items, tools=tools) items += r.output  # the whole turn goes back: reasoning, message, callsfor call in (o for o in r.output if o.type == "function_call"):    result = get_weather(**json.loads(call.arguments))    items.append({"type": "function_call_output", "call_id": call.call_id, "output": json.dumps(result)}) final = client.responses.create(model="venym/chimaera-1", input=items, tools=tools)print(final.output_text)

Streaming

With stream: true the answer arrives as Responses events: an event: line naming the type, then data: with the event, numbered by sequence_number.

text
response.createdresponse.in_progressresponse.output_item.added           reasoning itemresponse.content_part.addedresponse.reasoning_text.delta        ... the thinking, in piecesresponse.reasoning_text.doneresponse.content_part.doneresponse.output_item.doneresponse.output_item.added           message itemresponse.content_part.addedresponse.output_text.delta           ... the answer, in piecesresponse.output_text.doneresponse.content_part.doneresponse.output_item.doneresponse.completed                   the whole Response, with usage
  • A function call is response.output_item.added, response.function_call_arguments.delta events, response.function_call_arguments.done, then response.output_item.done.
  • A reply that hits max_output_tokens ends with response.incomplete instead of response.completed.
  • A failure mid-reply sends an error event, then response.failed with response.error.code: upstream_timeout (the model ran out of time), upstream_error (the connection dropped) or inference_error. The OpenAI SDKs raise an APIError.
  • Refusals that come before the first event (a bad request, a context that is too long, no credit, a rate limit) are ordinary HTTP errors, stream or not. See errors.
  • While the model is quiet (a long prompt, long thinking) the stream sends : keepalive comments, which SSE clients skip.

Nothing is stored

UncensoredLLM keeps no responses and no conversations, so each call carries the whole conversation in input. The Agents SDK and Codex already work this way.

  • previous_response_id returns 400 previous_response_not_found. conversation, background and stored prompt templates return 400 unsupported_parameter.
  • GET, DELETE and cancel on /v1/responses/{id} return 404 response_not_found.
  • reasoning items you send back are accepted but not shown to the model again: they would be billed as prompt, and the model's own template drops old thinking. web_search_call items are skipped too.

Agents SDK and Codex

OpenAI Agents SDK

script.pyPython
import osfrom openai import AsyncOpenAIfrom agents import Agent, Runner, set_default_openai_client, set_tracing_disabled set_default_openai_client(AsyncOpenAI(base_url="https://uncensoredllm.xyz/v1", api_key=os.environ["UNCENSOREDLLM_API_KEY"]))set_tracing_disabled(True)  # traces would go to OpenAI, with your UncensoredLLM key agent = Agent(name="Assistant", instructions="Be concise.", model="chimaera-1")print(Runner.run_sync(agent, "Write a haiku about recursion.").final_output)

Codex CLI

toml
# ~/.codex/config.tomlmodel = "venym/chimaera-1"model_provider = "uncensoredllm"model_context_window = 131072  # so Codex compacts the conversation before it outgrows the model [model_providers.uncensoredllm]name = "UncensoredLLM"base_url = "https://uncensoredllm.xyz/v1"env_key = "UNCENSOREDLLM_API_KEY"wire_api = "responses"

Codex warns that it has no metadata for the model and uses defaults; the context window line is the one that matters. Its own tools work as sent, sub-agents included. Its web search is in cached mode by default, which UncensoredLLM leaves off. With web_search = "live" every call is grounded in web search, billed per search.