API reference
Responses
The OpenAI Responses format: one input field that takes a string or a list of items, and typed output items back.
https://api.oneapi.id/v1/responses- Key header
Authorization: Bearerorx-api-key- Streaming
"stream": true, typed events- Client
openaiSDK,responses
Request
curl https://api.oneapi.id/v1/responses \
-H "Authorization: Bearer $ONEAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-fable-5.1",
"input": "Say hello in one sentence."
}'Body fields
These fields work with every model, whatever format its provider speaks.
modelstring requiredA model ID from Models. Append :online, as in deepseek-v4.1-flash:online, to let the model search the web; see Web search.
inputstring | array requiredA prompt string, or a list of message and function-call items.
instructionsstringSystem instructions placed before the input.
max_output_tokensintegerUpper bound on generated tokens.
temperaturenumberSampling temperature.
top_pnumberNucleus sampling.
stopstring | arraySequences that end generation.
toolsarrayFunction tools. Hosted tools such as web search cannot be converted to other formats.
tool_choicestring | objectWhether and which tool the model must call.
pluginsarrayOneAPI extension. [{"id": "web"}] turns on web search like :online, with an optional max_results (1–10) per search. Only web is supported. See Web search.
streambooleanSend typed Server-Sent Events. See Streaming.
storebooleanfalse is always accepted. true asks the provider to keep the response, which only works on models served in this format.
Other fields
Any other field in this format, such as previous_response_id, text.format or reasoning, is passed to the provider unchanged when the model is served in this same format. When the gateway has to convert the request for another format, it refuses the field with 400 unsupported_parameter and names it in the message, rather than dropping it.
If you get that error, remove the field or choose another model. The full list of codes is in Errors.
Response
A response object. The text is in the output_text part of the first message item; the SDKs expose it as response.output_text.
{
"id": "resp_...",
"object": "response",
"status": "completed",
"model": "claude-fable-5.1",
"output": [
{
"type": "message",
"role": "assistant",
"content": [{ "type": "output_text", "text": "Hello! How can I help?" }]
}
],
"usage": { "input_tokens": 12, "output_tokens": 8, "total_tokens": 20 }
}