Responses Format
OpenAI Responses API for creating model responses. Supports multi-turn chat, tool calls, and reasoning.
Note: Full path: POST /v1/responses. input may be a string or message array; use previous_response_id for multi-turn chats.
Example model
Examples below use gpt-4o (GPT-4o). Replace model and adjust size, quality, etc. per console docs when switching models.
Create response
POST
https://token.easyapi.com/v1/responsesCreate a model response with the OpenAI Responses API. Supports multi-turn chat, tool calls, and reasoning.
Request parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Authorization | header | string | Yes | EasyAPI API Key. Format: Bearer `API_KEY` |
Content-Type | header | string | Yes | Request body format, always application/json |
Request body
| Name | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model ID |
input | string | array<object> | No | Input content as a string or message array |
instructions | string | No | System-level instructions for model behavior |
max_output_tokens | integer | No | Maximum output tokens |
temperature | number | No | Sampling temperature |
top_p | number | No | Nucleus sampling parameter |
stream | boolean | No | Enable streaming responses |
tools | array<object> | No | Tool definitions the model may call |
tool_choice | string | object | No | Tool choice strategy, string or object |
reasoning | object | No | Reasoning configuration |
previous_response_id | string | No | Previous response ID for multi-turn chat |
truncation | string | No | Truncation strategy: auto |
Example
{
"model": "gpt-4o",
"input": "Hello!",
"instructions": "You are a helpful assistant.",
"max_output_tokens": 1024
}Response example
{
"id": "resp_abc123",
"object": "response",
"created_at": 1718452800,
"status": "completed",
"model": "gpt-4o",
"output": [
{
"type": "message",
"id": "msg_abc123",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "Hello! How can I help you today?"
}
]
}
],
"usage": {
"prompt_tokens": 15,
"completion_tokens": 12,
"total_tokens": 27,
"prompt_tokens_details": {
"cached_tokens": 0,
"text_tokens": 15,
"audio_tokens": 0,
"image_tokens": 0
},
"completion_tokens_details": {
"text_tokens": 12,
"audio_tokens": 0,
"reasoning_tokens": 0
}
}
}