latestOpenAPI 3.0.22026-08-1751714.1 KB

434c9de75420

Chat Completions

Create a chat completion

Creates a chat completion using an OpenAI-compatible request body. Use model ids returned by GET /models.

post/chat/completions

Request body

audioobject nullable
frequency_penaltynumber nullable
functionsobject[] nullable
logit_biasobject nullable
logprobsboolean nullable
max_completion_tokensinteger nullable
max_tokensinteger nullable
metadataobject nullable
modalitiesstring[] nullable
modelstring required

Model id returned by GET /models.

ninteger nullable
parallel_tool_callsboolean nullable
predictionobject nullable
presence_penaltynumber nullable
prompt_cache_keystring nullable
prompt_cache_retentionstring nullable
reasoningobject nullable
reasoning_effortstring nullable
response_formatobject nullable
safety_identifierstring nullable
seedinteger nullable
service_tierstring nullable
storeboolean nullable
streamboolean nullable
temperaturenumber nullable
toolsobject[] nullable
top_logprobsinteger nullable
top_pnumber nullable
userstring nullable
verbositystring nullable
web_search_optionsobject nullable

Example request

{
  "messages": [
    {
      "content": [
        {
          "type": "text"
        }
      ]
    }
  ],
  "model": "kimi-k2-5"
}

Response

Chat completion response

createdinteger required
idstring required
modelstring required
objectstring required

Example response

{
  "choices": [
    {
      "message": {
        "content": [
          {
            "type": "text"
          }
        ]
      }
    }
  ]
}