v1

latestOpenAPI 3.0.32026-07-132681171.6 KB

Create response

Send input to an OpenAI-compatible model using the Responses API format and receive a response.

post/v1/responses

Headers

x-api-keystring

Your Requesty API key. Alternative to the standard Authorization: Bearer header.

Request body

modelstring required

The model to use for the response. To route OpenAI models through their native Responses API, use the openai-responses/ prefix (e.g. openai-responses/gpt-5).

instructionsstring

Inserts a system (or developer) message as the first item in the model's context.

max_output_tokensinteger

Upper bound for the number of tokens that can be generated, including visible output tokens and reasoning tokens.

streamboolean

If true, the response is streamed to the client as it is generated using server-sent events.

temperaturenumber

Sampling temperature between 0 and 2. Higher values produce more random output.

top_pnumber

Nucleus sampling: consider tokens with cumulative probability mass up to top_p.

parallel_tool_callsboolean

Whether to allow the model to run tool calls in parallel.

includestring[]

Specify additional output data to include in the model response.

metadataobject

Set of key-value pairs that can be attached to the request.

storeboolean

Whether to store the generated model response for later retrieval via API.

truncationstring

The truncation strategy to use for the model response.

userstring

A unique identifier representing your end-user.

Example request

{
  "model": "openai-responses/gpt-5",
  "input": "Tell me a three sentence bedtime story about a unicorn."
}

Response

Response

idstring required

Unique identifier for this response.

object'response' required

Object type.

created_atinteger required

Unix timestamp (in seconds) of when the response was created.

modelstring required

Model ID used to generate the response.

status'completed' | 'failed' | 'in_progress' | 'incomplete' required

Status of the response generation.