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.

POST /v1/responses

Creates a response (streaming or non-streaming).

Example Request

Python
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
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

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).

Want help finding the right model?