Chat Completions
Generate responses using OpenAI-compatible payload schemas. Plannix supports streaming (Server-Sent Events), native function/tool calling, JSON mode, and deferred async processing.
POST/v1/chat/completions
Chat completions
Creates a model response for the given chat conversation.
| Parameter | Type | Description |
|---|---|---|
| modelrequired string | string | ID of the model to use (e.g. plannix-3.6-ultra). |
| messagesrequired array | array | A list of messages comprising the conversation so far. |
| stream boolean | boolean | If set, partial message deltas will be sent like in ChatGPT via SSE. |
| tools array | array | A list of tools the model may call. Currently functions are supported. |
cURL Requestbash
curl https://api.plannix.web.id/v1/chat/completions \
-H "Authorization: Bearer ${PLANNIX_API_KEY}" \
-H "Content-Type: application/json" \
-d '{
"model": "plannix-3.6-ultra",
"messages": [{"role": "user", "content": "Hello Plannix!"}],
"temperature": 0.7
}'GET/v1/chat/completions/deferred/{request_id}
Get deferred chat completions
When requests are submitted with header X-Plannix-Async: true, this endpoint polls the asynchronous execution status and returns the final completion once finished.
Server-Sent Events (SSE) streaming
When stream: true is provided, chunks are emitted as standard event streams terminating with data: [DONE].
Tool and function calling
Plannix models support parallel tool calling and strict schema validation adhering to JSON Schema Draft 7 specifications.