v5

latestOpenAPI 3.1.02026-08-081,0211,3082.1 MB
AGENTS
Chat

Create Chat Completion

Create a chat completion (OpenAI-compatible).

Uses litellm with provider fallback: Anthropic Sonnet 5 → Azure GPT-5.5. The model in the request is ignored — provider selection is automatic.

post/agents/v1/chat/completions

Headers

x-session-idstring nullable

Optional opaque conversation identifier. When provided, the call's Langfuse trace is grouped under this session_id, letting a multi-turn agentic conversation appear as one timeline. Clients should pass the same value across every turn of a single conversation.

Optional opaque conversation identifier. When provided, the call's Langfuse trace is grouped under this session_id, letting a multi-turn agentic conversation appear as one timeline. Clients should pass the same value across every turn of a single conversation.

Request body

modelstring
frequency_penaltynumber nullable
presence_penaltynumber nullable
streamboolean nullable
temperaturenumber nullable
top_pnumber nullable
userstring nullable
max_tokensinteger nullable
max_completion_tokensinteger nullable
reasoning_effort'low' | 'medium' | 'high' nullable
ninteger nullable
extra_bodyobject nullable

Response

Successful Response

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