Skip to content

Create Model Response (Control Thinking Length)

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 about which models can be used with the Chat API, please refer to the model endpoint compatibility table.
inputstringOptional
reasoningobjectOptionalDescription of the chain of thought used by the reasoning model when generating responses.
  └ effortstringOptionalCurrently supported values are minimal, low, medium, and high. Reducing reasoning effort can speed up response time and reduce tokens used for reasoning in the response. Default is medium

Request Example

json
{
    "model": "gpt-5.1",
    "input": [
        {
            "role": "user",
            "content": "Write a one-sentence bedtime story about a unicorn."
        }
    ],
    "reasoning": {
      "effort": "high"
    }
  }

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.1",
    "input": [
        {
            "role": "user",
            "content": "Write a one-sentence bedtime story about a unicorn."
        }
    ],
    "reasoning": {
      "effort": "high"
    }
  }'

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
    }
}