Skip to main content
POST
Stream a chat reply
The streaming guide has complete readers for JavaScript and Python. Use curl -N to watch the raw stream.

Authorizations

Authorization
string
header
required

The access token from your DualMind Arena session (a Supabase JWT). See Authentication.

Body

application/json
prompt
string
required

The user prompt. Must not be empty.

Example:

"Explain TCP vs UDP with a pizza analogy"

model
string
default:auto

Model to use: a modelName (or modelId) from GET /api/models, or auto to let the Arena pick a random model.

Example:

"auto"

system
string

Optional system prompt.

maxTokens
integer
default:4096

Maximum tokens to generate.

Required range: x >= 1
temperature
number
default:0.7

Sampling temperature.

Required range: 0 <= x <= 2
threadId
string<uuid>

Save the prompt and reply to this thread. You must own the thread.

Response

An event stream.

One chunk of generated text.

object
string
Allowed value: "ai.stream.delta"
delta
object
Last modified on October 18, 2026