> ## Documentation Index
> Fetch the complete documentation index at: https://incredible-42686482-cursor-create-detailed-ai-agent-cookboo.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Chat Completion

> Ask a question and get a response. Use stream=true to receive an SSE stream, or stream=false for a single JSON response.

### Responses

#### stream = true

```text
data: {"content": {"type": "text_chunk", "content": "Hello"}}
data: {"content": {"type": "function_call", "function_call_id": "...", "function_calls": []}}
data: {"content": "[DONE]"}
```

#### stream = false

```json
{
  "result": {
    "response": [
      {
        "content": "Hello! 👋",
        "role": "assistant"
      }
    ],
    "thinking": "Greet the user briefly."
  }
}
```
