Skip to content

Create Model Response gpt-5 with Thinking Enabled

POST https://www.kkiai.com/v1/responses

https://platform.openai.com/docs/api-reference/responses/create
Some OpenAI models only support Response format, such as o3-pro, codex-mini-latest

Request Parameters

Authorization

Add the Authorization parameter in the Header, with its value being the Token concatenated after Bearer

Example: Authorization: Bearer ********************

Header Parameters

Parameter NameTypeRequiredDescriptionExample
Content-TypestringRequiredapplication/json
AcceptstringRequiredapplication/json
AuthorizationstringOptionalBearer {{YOUR_API_KEY}}

Body Parameters (application/json)

Parameter NameTypeRequiredDescription
modelstringOptionalThe ID of the model to use. For detailed information on which models can be used with the Chat API, refer to the model endpoint compatibility table.
inputarray[object]OptionalText and images for the model to generate a response.
  └ rolestringRequired
  └ contentarray[object]Required
toolsarray[string]OptionalA set of tools that the model can call. Currently, only functions are supported as tools. Use this feature to provide a list of functions for which the model can generate JSON inputs.
textobjectOptionalConfiguration options for the model's text response. Can be plain text or structured JSON data.
  └ formatobjectOptionalSpecifies the format that the model must output.
  └ verbositystringOptionalLimits the verbosity of the model's response. Lower values produce more concise responses, while higher values produce more detailed responses. Currently supported values are low, medium, and high. Default is medium
reasoningobjectOptional
  └ effortstringOptionalCurrently supported values are minimal, low, medium, and high. Reducing reasoning effort can speed up responses and reduce tokens used for reasoning in the response. Default is medium
  └ summarystringOptionalA summary of the reasoning performed by the model. This is useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.
streambooleanOptionalDefault is false. If set, partial message increments will be sent like in ChatGPT. Tokens will be sent as server-sent events in data-only format, which terminate the stream with a data: [DONE] message when available. Python code example.
storebooleanOptionalWhether to store the generated model response for later retrieval via API. Default is true

Request Example

json
{
    "model": "gpt-5-2025-08-07",
    "input": [
        {
            "role": "user",
            "content": [
                {
                    "type": "input_text",
                    "text": "1+2+3+4+5....9985"
                }
            ]
        }
    ],
    "tools": [],
    "text": {
        "format": {
            "type": "text"
        },
        "verbosity": "medium"
    },
    "reasoning": {
        "effort": "medium",
        "summary": "auto"
    },
    "stream": true,
    "store": true
}

cURL Example

bash
curl --location --request POST 'https://www.kkiai.com/v1/responses' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "gpt-5-2025-08-07",
    "input": [
        {
            "role": "user",
            "content": [
                {
                    "type": "input_text",
                    "text": "1+2+3+4+5....9985"
                }
            ]
        }
    ],
    "tools": [],
    "text": {
        "format": {
            "type": "text"
        },
        "verbosity": "medium"
    },
    "reasoning": {
        "effort": "medium",
        "summary": "auto"
    },
    "stream": true,
    "store": true
}'

Response

🟢 200 OK

Response Body

Parameter NameTypeRequiredDescription
idstringRequired
objectstringRequired
createdintegerRequired
choicesarray[object]Required
  └ indexintegerOptional
  └ messageobjectOptional
  └ finish_reasonstringOptional
usageobjectRequired
  └ prompt_tokensintegerRequired
  └ completion_tokensintegerRequired
  └ total_tokensintegerRequired

Response Example

json
{
    "id": "chatcmpl-123",
    "object": "chat.completion",
    "created": 1677652288,
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "\n\nHello there, how may I assist you today?"
            },
            "finish_reason": "stop"
        }
    ],
    "usage": {
        "prompt_tokens": 9,
        "completion_tokens": 12,
        "total_tokens": 21
    }
}