OpenAI Chat Completions–compatible JSON body (model, messages, optional stream, tools, etc.). The server injects conversation history for the session, applies a default model when needed, and runs inference for you. Responses may be JSON or text/event-stream — server-sent events.
If the last user message is exactly /new, the API creates a new session and returns a minimal SSE stream without calling inference.
Billing: Requires spendable balance for the project; otherwise 402.
Session JWT from Ageneral sign-in. Send as Authorization: Bearer <token>.
Project id. You must be a member with access.
Existing platform chat session to continue. Omit to create a new session on first non-/new turn.
Aligned with OpenAI Create chat completion. The server may override or fill model and merges prior turns from storage.
Success. JSON completion object or text/event-stream when streaming.
OpenAI-compatible chat completion object when not streaming.