Chat completions
Multi-turn chat with optional streaming.
POST /v1/chat/completions
Content-Type: application/json
{
"model": "automatic",
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Hello!" }
],
"stream": false
}Streaming
Set stream: true. Response is Server-Sent Events with standard chunk objects.
SDK
import Saakh from "@saakh/saakh";
const saakh = new Saakh();
await saakh.chat.completions.create({
model: "automatic",
messages: [{ role: "user", content: "Hello!" }],
});