Streaming
With stream: true you receive chat.completion.chunk events ending in data: [DONE]. Add stream_options: {"include_usage": true} for a final chunk with usage and cost. If you disconnect mid-stream the generation still completes and is billed.
curl https://api.ultragpt.pro/v1/chat/completions \
-H "Authorization: Bearer $ULTRAGPT_API_KEY" \
-H "Content-Type: application/json" \
-N -d '{
"model": "grok-4.7",
"stream": true,
"messages": [{ "role": "user", "content": "Write a haiku about APIs" }]
}'