Create a new chat session and start building with AI
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer macaly_... |
Content-Type | Yes | application/json |
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
content | string | Yes | - | The user’s message/prompt |
stream | boolean | No | true | If false, returns JSON instead of stream |
backend | string | No | "DEFAULT" | Backend to use |
executionMode | string | No | - | "auto", "planning", or "build" |
stream: false)| Field | Type | Description |
|---|---|---|
chatId | string | The unique chat identifier |
url | string | Direct URL to view the chat |
streamId | string | Stream identifier for subscribing |
assistantMessageId | string | ID of the assistant message being generated |
stream: true, default)2:[{"chatId":"..."}].
| Status | Description |
|---|---|
| 200 | Success - Chat created |
| 400 | Invalid request body |
| 401 | Invalid or missing API key |
| 402 | Insufficient credits |
| 429 | Rate limited |
| 500 | Server error |
GET /api/chat/{chatId}/statusGET /api/chat/{chatId}/subscribe for real-time updatesPOST /api/chat/{chatId}/publish