🎁 New Sign up free, 10 calls on us. Up to $1, no card needed.

Responses API

POST /v1/responses

Compatible with the OpenAI Responses API. Supports structured input items, tool use, and built-in reasoning. The gateway transparently proxies to the upstream provider.

Request Body

ParameterTypeDescription
model*stringID of the model to use (e.g. gpt-5.4, gpt-5.4-mini).
input*string | arrayText string or array of input items (message objects with role and content).
streambooleanIf true, return a stream of SSE events. Default: false.
temperaturenumberSampling temperature 0–2. Default: 1.
max_output_tokensintegerMax tokens to generate in the response.
toolsarrayList of tool definitions the model may call.
reasoningobjectReasoning configuration (e.g. { "effort": "high" }) for o-series models.

Example Request

POST /v1/responses
Authorization: Bearer YOUR_API_KEY

{
  "model": "gpt-5.4-mini",
  "input": "What is the capital of France?",
  "max_output_tokens": 256
}

Example Response

{
  "id": "resp_abc123",
  "object": "response",
  "created_at": 1714000000,
  "model": "gpt-5.4-mini",
  "output": [
    {
      "type": "message",
      "role": "assistant",
      "content": [
        { "type": "output_text", "text": "The capital of France is Paris." }
      ]
    }
  ],
  "usage": {
    "input_tokens": 12,
    "output_tokens": 9,
    "total_tokens": 21
  }
}

The Responses API is the recommended way to interact with OpenAI models. It supports tool use, structured outputs, and reasoning configuration natively.