Skip to content

Chat Completions API request shape

POST /v1/chat/completions accepts the OpenAI Chat Completions request body. Kindo validates the core fields and forwards the rest verbatim, which keeps the endpoint forward-compatible with new OpenAI request fields.

Required fields

FieldTypeNotes
modelstringA model ID from GET /v1/models.
messagesarrayMust contain at least one entry. See Messages array.

Standard fields

FieldTypeForwarded?Notes
streambooleanConsumed by the route handler to switch into SSE mode.
temperaturenumberYesSampling temperature.
max_tokensintegerYesMax tokens to generate.
top_pnumberYesNucleus sampling.
frequency_penaltynumberYes
presence_penaltynumberYes
stopstring | arrayYesStop sequences.
toolsarrayYesOpenAI tool definitions (see Tool use).
tool_choicestring | objectYes"auto", "none", "required", or {type: "function", function: {name: "..."}}.
response_formatobjectYesE.g. {type: "json_object"} or {type: "json_schema", ...}.
userstringYesEnd-user identifier.
seedintegerYesDeterminism hint, where the upstream model supports it.
logprobsboolean / objectYesForwarded to the upstream model.

Anything not listed above passes through Kindo’s schema verbatim because the validator uses passthrough(). Refer to OpenAI’s Chat Completions spec for full field semantics.

Stripped-on-ingress fields

Kindo strips these fields from the outgoing upstream request so clients can’t spoof governance metadata:

  • metadata
  • litellm_metadata
  • proxy_server_request

Messages array

Each message has the following shape:

FieldRequiredNotes
roleYessystem, developer, user, assistant, or tool.
contentNoString, array of content blocks, or null (for assistant messages with only tool_calls). Arrays are forwarded verbatim and support multimodal blocks.
nameNoAuthor name.
tool_callsNoTool calls generated by the model (present on assistant messages).
tool_call_idNoRequired on role: "tool" messages — the ID of the tool call this message is responding to.

developer is treated identically to system and matches OpenAI’s own semantics.

Kindo extension fields

/v1/chat/completions is stock OpenAI — Kindo does not accept a kindo request block on this surface. Kindo’s opt-in extensions (curated system prompt, hosted tools, stateful conversations) are available on /v1/responses; see the Chat Actions guide.

Worked example

{
"model": "claude-sonnet-4-5-20250929",
"messages": [
{ "role": "system", "content": "You are a concise security assistant." },
{ "role": "user", "content": "Summarize CVE-2024-3094." }
],
"tools": [
{
"type": "function",
"function": {
"name": "lookup_cve",
"description": "Fetch CVE metadata.",
"parameters": {
"type": "object",
"properties": { "id": { "type": "string" } },
"required": ["id"]
}
}
}
],
"tool_choice": "auto",
"max_tokens": 512,
"temperature": 0.2
}

This is stock OpenAI Chat Completions. Kindo accepts it identically to OpenAI’s /v1/chat/completions.

See also