Model Rover

Responses

Use the stateless subset of the OpenAI Responses API for text, multimodal input, tools, and streaming.

POST /v1/responses

Creates an OpenAI Responses-compatible result. The endpoint supports synchronous JSON and SSE, but intentionally exposes only stateless calls.

Stateless subset

Omit stateful fields or send store: false. The gateway never lets an upstream account persist your response by default.

POST /v1/responses
Authorization: Bearer $API_KEY
Content-Type: application/json

Request body

FieldTypeRequiredDescription
modelstringYesComplete public model ID.
inputstring or arrayYes for a normal callText or Responses input items.
instructionsstringNoSystem or developer instructions.
streambooleanNoReturn Responses SSE events when true.
max_output_tokensintegerNoMaximum generated output, including reasoning tokens.
temperaturenumberNoSampling temperature when supported.
top_pnumberNoNucleus sampling when supported.
toolsarrayNoFunction or protocol-native built-in tools.
tool_choicestring or objectNoTool-selection policy.
reasoningobjectNoModel-specific reasoning effort and summary options.
textobjectNoText output format, including compatible structured-output schemas.
includestring[]NoAdditional protocol-native output data to include.
parallel_tool_callsbooleanNoAllow compatible models to emit parallel tool calls.
userstringNoStable end-user identifier.
storebooleanNoMust be omitted or false.
backgroundbooleanNoMust be omitted or false.

input can be a plain string or an array containing message, function_call, function_call_output, and supported protocol-native items. Message content can contain input_text and input_image parts.

Synchronous example

curl "http://127.0.0.1:11113/v1/responses" -H "Authorization: Bearer $API_KEY" -H "Content-Type: application/json" -d '{
  "model": "openai/gpt-5.2",
  "instructions": "Answer concisely.",
  "input": "What is a model gateway?",
  "store": false
}'

A typical response contains a response ID, creation time, status, output items, and usage:

{
  "id": "resp_req_01J...",
  "object": "response",
  "created_at": 1767225600,
  "status": "completed",
  "model": "openai/gpt-5.2",
  "output": [
    {
      "id": "msg_req_01J..._0",
      "type": "message",
      "status": "completed",
      "role": "assistant",
      "content": [
        {
          "type": "output_text",
          "text": "A model gateway provides one API over multiple AI models.",
          "annotations": []
        }
      ]
    }
  ],
  "store": false,
  "usage": {
    "input_tokens": 12,
    "input_tokens_details": { "cached_tokens": 0 },
    "output_tokens": 13,
    "output_tokens_details": { "reasoning_tokens": 0 },
    "total_tokens": 25
  }
}

model is rewritten to the public ID and store remains false.

Streaming

Set stream: true to receive named SSE events. Handle item-level deltas and wait for a terminal response.completed, response.incomplete, response.failed, or error event. Same-protocol streams preserve provider-native event fields.

event: response.output_text.delta
data: {"type":"response.output_text.delta","sequence_number":4,"item_id":"msg_req_01J..._0","output_index":0,"content_index":0,"delta":"Hello","logprobs":[]}

event: response.completed
data: {"type":"response.completed","sequence_number":20,"response":{"id":"resp_req_01J...","status":"completed"}}

A stream normally begins with response.created and response.in_progress, emits item/content lifecycle events, and ends at the terminal response event. Do not require a [DONE] marker.

Tools and protocol fidelity

On a same-protocol route, built-in tools and provider extensions are passed through, including compatible reasoning and search controls. On a cross-protocol route, only function tools have a shared representation; built-in tools, file references, audio items, and other protocol-only items can be named in x-dropped-params.

Encrypted reasoning context can be returned in reasoning.encrypted_content. Send the item back unchanged when the same protocol requires reasoning continuity. The gateway preserves it in transit but replaces it with a size placeholder in request logs.

Unsupported state

The following values return 400 stateful_not_supported:

  • store: true
  • background: true
  • A non-null previous_response_id
  • A non-null conversation

The gateway does not expose Responses retrieval, deletion, compaction, or background-result endpoints. Client routing fields and paid service tiers are also rejected.

Help us improve this page

Found something unclear, outdated, or incorrect?

Last updated on