Create Response (OpenAI Responses API)
Run in Apifox
OpenAI Responses API format. Supports streaming. This is the newer stateful API from OpenAI that supports conversation state management. Supports tool calls, file inputs, and reasoning models.
Request Add parameter in header Authorization
Example: Authorization: ********************
or
Body Params application/json Required
{
"model" : "gpt-5" ,
"input" : "string" ,
"instructions" : "string" ,
"max_output_tokens" : 0 ,
"temperature" : 0 ,
"top_p" : 0 ,
"stream" : true ,
"tools" : [
{ }
] ,
"tool_choice" : "string" ,
"reasoning" : {
"effort" : "low" ,
"summary" : "auto"
} ,
"truncation" : "auto" ,
"user" : "string" ,
"metadata" : { }
} Request Code Samples
curl --location --request POST 'https://api.ccapi.ai//v1/responses' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"model": "gpt-5",
"input": "string",
"instructions": "string",
"max_output_tokens": 0,
"temperature": 0,
"top_p": 0,
"stream": true,
"tools": [
{}
],
"tool_choice": "string",
"reasoning": {
"effort": "low",
"summary": "auto"
},
"truncation": "auto",
"user": "string",
"metadata": {}
}' Responses
{
"id" : "string" ,
"object" : "response" ,
"created_at" : 0 ,
"status" : "completed" ,
"model" : "string" ,
"output" : [
{
"type" : "string" ,
"id" : "string" ,
"role" : "string" ,
"content" : [
{ }
]
}
] ,
"usage" : {
"prompt_tokens" : 0 ,
"completion_tokens" : 0 ,
"total_tokens" : 0 ,
"prompt_tokens_details" : {
"cached_tokens" : 0 ,
"text_tokens" : 0 ,
"audio_tokens" : 0 ,
"image_tokens" : 0
} ,
"completion_tokens_details" : {
"text_tokens" : 0 ,
"audio_tokens" : 0 ,
"reasoning_tokens" : 0
}
}
}
Modified at 2026-03-15 06:56:57