Responses API
The /v1/responses endpoint, compatible with the OpenAI Responses API
POST /v1/responses accepts the OpenAI Responses API format. In the OpenAI SDK it is called with client.responses.create; Codex CLI uses this endpoint too (see Codex CLI). Requests go through the same model catalog, billing and limits as Chat Completions.
/v1/responses
Creates a response (streaming or non-streaming).
Example Request
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["ONYSOFT_API_KEY"],
base_url="https://api.onysoft.com/v1"
)
response = client.responses.create(
model="openai/gpt-5.3-codex",
input="Merhaba! Kendini bir cümleyle tanıt.",
max_output_tokens=2048,
)
print(response.output_text)
curl https://api.onysoft.com/v1/responses \
-H "Authorization: Bearer $ONYSOFT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "openai/gpt-5.3-codex", "input": "Merhaba!", "max_output_tokens": 2048}'
Supported Features
- Fields:
input(text or an array of items),instructions,max_output_tokens,temperature,top_p,tools,tool_choice,parallel_tool_calls,reasoning.effort,text.format(json_schemaandjson_object) andstream. - Tools:
function, free-textcustomtools (e.g. Codex'sapply_patchtool) andnamespacegroups. - Hosted tools (
web_search,file_search,code_interpreter,image_generation,computer,mcp,tool_search) do not cause an error: they are removed from the request, the response carries anX-Onysoft-Warning: ignored_tools=…header, and atool_choicetargeting them becomesauto. - Ignored fields:
store,metadata,include,truncation,service_tier,user,prompt_cache_keyand similar. - The model field accepts the full catalog id or an unprefixed name that matches exactly one model; for a name that matches several models the error message lists the candidates. For models that produce images or audio, use
/v1/chat/completions.
Responses Cannot Be Retrieved by ID
Response objects cannot be retrieved by id through the API (there is no store/retrieve): GET and DELETE /v1/responses/{id}, /input_items and /cancel return 404. You can read the usage record of a request with GET /v1/usage/{request_id} (the record of response resp_<id> is req_<id>). previous_response_id, conversation, prompt and background are not supported (400 unsupported_parameter): send the conversation history inside input on every request. References made with item_reference to items of earlier responses of the same account (of the same key for project keys) are resolved from the usage records of those requests.
Streaming
With stream: true you receive Responses SSE events (response.created, response.output_text.delta, response.function_call_arguments.delta, response.completed …). No data: [DONE] line is written; the stream ends with a response.completed, response.incomplete or response.failed event.
Error Format
Errors use the OpenAI format: {"error": {"message", "type", "param", "code"}}; there is no success field. The balance pre-check is the same as for Chat Completions; if you do not send max_output_tokens, the model's maximum output is used (see Balance pre-check).