Skip to main content
POST
/
v2
/
chats
/
stream
Stream Chat
curl --request POST \
  --url https://app.textql.com/v2/chats/stream \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "question": "<string>",
  "chat_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tools": {
    "connector_ids": [
      123
    ],
    "sql_enabled": true,
    "python_enabled": true,
    "web_search_enabled": true,
    "ontology_enabled": true,
    "tableau_enabled": true,
    "powerbi_enabled": true,
    "google_drive_enabled": true
  },
  "connector_ids": [
    123
  ]
}
'
"<string>"

Authorizations

Authorization
string
header
required

API key or JWT token

Body

question
string
required

The question to ask

chat_id
string<uuid>

Existing chat ID to continue a conversation

tools
object

Tool configuration. Enable specific tools for this chat session.

connector_ids
integer<int32>[]

Connector IDs to query (shorthand for tools.connector_ids)

Response

Server-Sent Events stream

SSE stream with JSON data payloads. Event types:

  • {"type":"metadata","id":"...","created_at":"...","model":"...","chat_id":"...","is_continuation":bool}
  • {"type":"text","text":"..."}
  • {"type":"asset","asset":{...}}
  • {"type":"done","status":"completed|failed","error":"..."}