Skip to content
中文

POST /v1/responses

Method: POSTEndpoint: /v1/responses

https://platform.openai.com/docs/api-reference/responses/create

Some OpenAI models support only the Responses format, such as o3-pro and codex-mini-latest.

Request Parameters

Header Parameters

text
Authorization
string
Optional
Default Value:
Bearer {{YOUR_API_KEY}}

Body Parameters application/json

text
model
string
Required
input
array
[object]
Required
role
string
Optional
content
string
Optional
Example
{
"model"
:
"o3-deep-research-2025-06-26"
,
"input"
:
[
{
"role"
:
"user"
,
"content"
:
"hi"
}
]
,
"tools"
:
[
{
"type"
:
"web_search_preview"
}
]
}

Example Request

Shell

bash
curl --location --request POST '/v1/responses' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "o3-deep-research-2025-06-26",
    "input": [
        {
            "role": "user",
            "content": "hi"
        }
    ],
    "tools": [
        {
            "type": "web_search_preview"
        }
    ]
}'

Response

🟢 200 Success

Content Type: application/json

Response Schema

text
object

Example

json
{
    "id": "resp_68760e92a79c81a28acd1e218f1fd40d0679399e11c8f799",
    "object": "response",
    "created_at": 1752567442,
    "status": "completed",
    "background": false,
    "error": null,
    "incomplete_details": null,
    "instructions": null,
    "max_output_tokens": null,
    "max_tool_calls": 225,
    "model": "o3-deep-research-2025-06-26",
    "output": [
        {
            "id": "rs_68760e93029081a29c2ef2a702b428fb0679399e11c8f799",
            "type": "reasoning",
            "summary": []
        },
        {
            "id": "ws_68760ea0d27081a2871459aa9ebbed950679399e11c8f799",
            "type": "web_search_call",
            "status": "completed",
            "action": {
                "type": "search",
                "query": "Hello how to greet user in chat GPT guidelines"
            }
        },
        {
            "id": "rs_68760ea19c0481a2a1f4e2b02bfc8f030679399e11c8f799",
            "type": "reasoning",
            "summary": []
        },
        {
            "id": "msg_68760ea3cde481a29e28ac61b5a7f71b0679399e11c8f799",
            "type": "message",
            "status": "completed",
            "content": [
                {
                    "type": "output_text",
                    "annotations": [],
                    "logprobs": [],
                    "text": "Hello there! 👋 How can I help you today? If there's anything you'd like to discuss or any question you have, feel free to let me know. I'm here to assist!"
                }
            ],
            "role": "assistant"
        }
    ],
    "parallel_tool_calls": true,
    "previous_response_id": null,
    "reasoning": {
        "effort": "medium",
        "summary": null
    },
    "service_tier": "default",
    "store": false,
    "temperature": 1,
    "text": {
        "format": {
            "type": "text"
        }
    },
    "tool_choice": "auto",
    "tools": [
        {
            "type": "web_search_preview",
            "search_context_size": "medium",
            "user_location": null
        }
    ],
    "top_logprobs": 0,
    "top_p": 1,
    "truncation": "disabled",
    "usage": {
        "input_tokens": 3420,
        "input_tokens_details": {
            "cached_tokens": 2686
        },
        "output_tokens": 2219,
        "output_tokens_details": {
            "reasoning_tokens": 2176
        },
        "total_tokens": 5639
    },
    "user": null,
    "metadata": {}
}