Skip to content
OneAPIDocs
ModelsOpen console

API reference

Responses

The OpenAI Responses format: one input field that takes a string or a list of items, and typed output items back.

POSThttps://api.oneapi.id/v1/responses
Key header
Authorization: Bearer or x-api-key
Streaming
"stream": true, typed events
Client
openai SDK, 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 required

A 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 required

A prompt string, or a list of message and function-call items.

instructionsstring

System instructions placed before the input.

max_output_tokensinteger

Upper bound on generated tokens.

temperaturenumber

Sampling temperature.

top_pnumber

Nucleus sampling.

stopstring | array

Sequences that end generation.

toolsarray

Function tools. Hosted tools such as web search cannot be converted to other formats.

tool_choicestring | object

Whether and which tool the model must call.

pluginsarray

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

streamboolean

Send typed Server-Sent Events. See Streaming.

storeboolean

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

200 OK, shape only
{
  "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 }
}