Text Chat
Request Fields
Basic Call
Streaming
With "stream": true, the server pushes content incrementally over SSE (Server-Sent Events) — good for typewriter-style output. Each chunk starts with data: , and you receive data: [DONE] when the stream finishes.
TIP
Your client or proxy must support SSE (no response buffering), otherwise streamed output stalls until timeout — see FAQ.
Multi-turn Conversation
Multi-turn chat needs no new parameters: just append prior messages to the messages array in order. Include the assistant's previous replies verbatim — the model continues from the full context:
NOTE
Every turn bills all input tokens again: the longer the conversation, the higher the input cost. Trim history messages promptly, or use a model with cached pricing to control costs — see Billing & Top-up.
