Responses Format
Create a model response using the official OpenAI Responses API format.
This endpoint only supports models that officially support the OpenAI Responses API. Do not use Claude, DeepSeek, or other models that only support Chat Completions or Messages format on this endpoint.
Try It
POST
/v1/responseshttps://api-platform.ope.aiAuthentication
Use Bearer token authentication.
- Header:
Authorization: Bearer <api-key> - Example:
Authorization: Bearer sk-xxxxxx
Request Body(application/json)
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID |
input | string | array | Yes | Input content; pass a string or an official Responses input item array |
instructions | string | No | System or developer instructions inserted into the model context |
max_output_tokens | integer | No | Maximum tokens the response can generate |
previous_response_id | string | No | Previous response ID for continuing context |
stream | boolean | No | Whether to use SSE streaming |
temperature | number | No | Sampling temperature |
top_p | number | No | Nucleus sampling parameter |
tools | array | No | Official Responses tools array |
tool_choice | string | object | No | Tool selection strategy |
parallel_tool_calls | boolean | No | Whether to allow parallel tool calls |
reasoning | object | No | Reasoning model options, such as effort and summary |
text | object | No | Text output configuration |
truncation | string | No | Context truncation strategy |
metadata | object | No | Metadata |
include | array | No | Official extra fields to include in the response |
store | boolean | No | Whether to store the response |
user | string | No | End-user identifier |
max_tool_calls | integer | No | Maximum total tool calls for this response |
Request Examples
- cURL
- JavaScript
- Python
curl -X POST "https://api-platform.ope.ai/v1/responses" \
-H "Authorization: Bearer $OPEAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5",
"input": "Introduce OPEAI Platform in one sentence."
}'
const res = await fetch("https://api-platform.ope.ai/v1/responses", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.OPEAI_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "gpt-5",
input: "Introduce OPEAI Platform in one sentence.",
}),
});
console.log(await res.json());
import os
import requests
resp = requests.post(
"https://api-platform.ope.ai/v1/responses",
headers={"Authorization": f"Bearer {os.environ['OPEAI_API_KEY']}"},
json={
"model": "gpt-5",
"input": "Introduce OPEAI Platform in one sentence.",
},
timeout=60,
)
print(resp.json())
Input Array Example
{
"model": "gpt-5",
"input": [
{
"role": "user",
"content": [
{
"type": "input_text",
"text": "Introduce OPEAI Platform in one sentence."
}
]
}
]
}
Response Example
{
"id": "resp_abc123",
"object": "response",
"created_at": 1762499410,
"status": "completed",
"model": "gpt-5",
"output": [
{
"type": "message",
"id": "msg_abc123",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "OPEAI Platform is a unified API platform for accessing multiple AI model capabilities.",
"annotations": []
}
]
}
],
"usage": {
"input_tokens": 18,
"output_tokens": 22,
"total_tokens": 40
}
}
Official reference: OpenAI Responses API