v1

latestOpenAPI 3.0.2raw.githubusercontent.com2025-10-15392455.7 KB
Chat

Create Chat Completion

Create a chat completion with automatic session creation if enabled.

Supports both streaming and non-streaming responses based on the 'stream' parameter. Tool calling is supported but may work better with streaming enabled.

post/api/v1/chat/completions

Request body

modelstring
temperaturenumber
top_pnumber
ninteger
streamboolean
max_tokensinteger
presence_penaltynumber
frequency_penaltynumber
session_idstring

Optional session ID to use for this request. If not provided, the system will use the session associated with the API key.

Response

Successful Response

{"stackTrail":"paths:/api/v1/chat/completions:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}