Streaming
Stream visible model output as OpenAI-compatible server-sent events.
Python
python
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["ADAPTIQ_API_KEY"],
base_url="https://api.adaptiqai.com/v1",
)
stream = client.chat.completions.create(
model="adaptiq-deepseek-v4.1-flash",
messages=[{"role": "user", "content": "Write a launch brief."}],
stream=True,
)
for event in stream:
text = event.choices[0].delta.content
if text:
print(text, end="", flush=True)cURL
bash
curl -N https://api.adaptiqai.com/v1/chat/completions \
-H "Authorization: Bearer $ADAPTIQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "adaptiq-deepseek-v4.1-flash",
"stream": true,
"messages": [
{"role": "user", "content": "Write a launch brief."}
]
}'Client disconnects
Treat the stream as resumable application output, not durable conversation storage. The provider captures accepted turns into Native Memory according to the workspace session policy.