Skip to main content
POST
Create Chat
Creates a new chat session and starts the AI workflow.

Request

Headers

Body Parameters

Attachment Format

Each item in the experimental_attachments array has the following structure:

Example Request

Response

JSON Response (when stream: false)

Streaming Response (when stream: true, default)

When streaming is enabled, the response is a text stream:
The first line contains the chat ID in the format 2:[{"chatId":"..."}].

Parsing the Chat ID from Stream

Status Codes

Next Steps

After creating a chat:
  1. Poll for completion using GET /api/chat/{chatId}/status
  2. Subscribe to stream using GET /api/chat/{chatId}/subscribe for real-time updates
  3. Send follow-up messages using POST /api/chat/{chatId}/publish