POST /v1/chat/completions
OpenAI-compatible chat completions endpoint. Streaming and non-streaming.Documentation Index
Fetch the complete documentation index at: https://docs.cogito.decart.ai/llms.txt
Use this file to discover all available pages before exploring further.
{ role: "system" | "user" | "assistant" | "tool", content: string }.true, responses are streamed as Server-Sent Events. See the streaming guide.0 to 2. Lower → more deterministic.temperature or top_p, not both."auto" (default), "none", or { type: "function", function: { name: ... } } to force.{ type: "json_object" } or { type: "json_schema", json_schema: {...} }. See structured outputs.-2.0 to 2.0. Penalize tokens by their frequency in the response so far.-2.0 to 2.0. Penalize tokens that have appeared at all.Content-Type: text/event-stream. Each event is data: <chat.completion.chunk JSON>. Stream ends with data: [DONE]. See the streaming guide.
x-request-id — opaque ID. Log it. We trace it through every layer.x-tokens-used — billed total for this request (omitted on errors that didn’t consume tokens).