Skip to main content
POST
/
v1
/
flexy-chat
/
stream
Stream a chat response
curl --request POST \
  --url https://dev.flextell.ai/api/v1/flexy-chat/stream \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Tenant: <x-tenant>' \
  --data '
{
  "prompt": "<string>",
  "history": [
    {
      "content": "<string>"
    }
  ]
}
'
{
  "event": "text_delta",
  "data": {}
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

X-Tenant
number
required

Tenant identifier. Send the Tenant ID in the X-Tenant header to scope API requests to a specific tenant.

Body

application/json
prompt
string
required

The user prompt to send to the assistant.

Required string length: 1 - 2000
history
object[] | null

Prior conversation messages (max 20 turns).

Maximum array length: 20

Response

200 - text/event-stream

SSE stream. Listen for text_delta events and read data.delta to render the response progressively.

event
enum<string>
required
Available options:
stream_start,
step_start,
text_start,
text_delta,
text_complete,
step_finish,
stream_end
Example:

"text_delta"

data
object
required