v1
latestOpenAPI 3.1.02026-07-2219165126.1 KBResponses
Create a response
Generate an OpenAI-compatible Responses API object from text or structured input items, with optional tools and streaming events.
post/v1/responses
Request body
Example request
{
"input": "Explain the tradeoff between throughput and latency.",
"instructions": "Respond in 2 bullet points.",
"model": "gpt-4.1-mini"
}Response
JSON response when stream=false, or Responses API Server-Sent Events when stream=true.
Example response
{
"completed_at": 1743393601,
"created_at": 1743393600,
"id": "resp_123",
"metadata": {},
"model": "gpt-4.1-mini",
"object": "response",
"output": [
{
"content": [
{
"annotations": [],
"logprobs": [],
"text": "- Caching avoids repeated upstream work for identical or similar requests.\n- It reduces latency spikes and helps keep infrastructure costs predictable.",
"type": "output_text"
}
],
"id": "msg_123",
"role": "assistant",
"status": "completed",
"type": "message"
}
],
"status": "completed",
"tools": [],
"usage": {
"input_tokens": 18,
"input_tokens_details": {
"cached_tokens": 0
},
"output_tokens": 31,
"output_tokens_details": {
"reasoning_tokens": 0
},
"total_tokens": 49
}
}