← All docs

Endpoints

Create a response

POST/v1/responses

Loading models…

Creates a response in the OpenAI Responses format. Conversations are not stored, so send earlier turns in input.

Body

modelstringYes
Model ID
inputstring | arrayYes
A string, or message, reasoning, function_call, function_call_output, custom_tool_call and custom_tool_call_output items
instructionsstringNo
System instructions
temperaturenumberNo
0–2
top_pnumberNo
0–1
streambooleanNo
Stream events
backgroundbooleanNo
true runs an async job and returns queued right away
tools / tool_choicearray / string|objectNo
Chat form, Responses flat form, or free-form (custom) tools
reasoning_effortstringNo
low, medium, high, xhigh, max. Some models add values such as none or minimal
reasoningobjectNo
OpenAI form. effort is the same setting as reasoning_effort
parallel_tool_callsbooleanNo
Same as Chat. true is the default and equals omitting it
textobjectNo
format (Chat's response_format) and verbosity (low, medium, high; GPT models only)
prompt_cache_key / safety_identifierstringNo
Same as Chat. Models other than GPT drop prompt_cache_key with a warning
userstringNo
End-user identifier
everyaisobjectNo
Gateway options such as caching and parameter_policy

Differences from OpenAI

  • Set reasoning effort with OpenAI's reasoning: {"effort": "low"} or the flat reasoning_effort. If you send both, they must match; different values return 400. reasoning.summary is accepted and ignored.
  • Stored-conversation fields such as previous_response_id return 400. store accepts only false.
  • text.format accepts OpenAI's flat {"type":"json_schema","name","schema","strict"} or the Chat form. Flat function tools work too.
  • Free-form tools ("type": "custom") work on every model. The model sees a function with one string argument, input, and its call comes back as a custom_tool_call item. The format grammar is passed on as a description, not enforced.
  • To continue a tool conversation, send back every output item, including reasoning items, with your function_call_output (or custom_tool_call_output). Gemini's tool signature is in the reasoning item's encrypted_content.
  • Images in a tool result (input_image) reach the model in a user message after the tool results. Models without image input return 400.
  • Web search and response_format are available only in Chat.

Model options

Pick a model at the top of this page, or read capabilities, limits and parameter_constraints from GET /v1/models. Parameter policy decides whether unsupported values are adjusted or rejected with 400.

Without reasoning_effort, high is used, or the model's nearest lower level when it has no high (on thinking-budget models, the highest of those that fits the output token limit). none disables reasoning only on models that list it.


GET /v1/responses/{id}

Gets a job submitted with background: true.

json
{
  "id": "resp_abc123",
  "object": "response",
  "created_at": 1709884800,
  "model": "everyais/gemini-3-8-flash",
  "status": "queued",
  "output": [],
  "error": null,
  "incomplete_details": null,
  "usage": null
}

status goes queued → in_progress → completed, incomplete, failed or cancelled. A finished job returns the full Response. Missing or expired jobs, and jobs of another key or user, return 404.

POST /v1/responses/{id}/cancel

Cancels a queued or in_progress job and refunds its credit. A finished job is returned unchanged.

Contact support