Streaming

Set stream: true to receive OpenAI-style Server-Sent Events from /v1/chat/completions.

Request

curl https://ozeye.ai/v1/chat/completions \
  -H "Authorization: Bearer $OZEYE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "mistral-small-latest",
    "stream": true,
    "messages": [
      {"role": "user", "content": "Stream a short product tagline."}
    ]
  }'

Event stream

data: {"choices":[{"delta":{"role":"assistant"},"index":0}]}
data: {"choices":[{"delta":{"content":"ozeye"},"index":0}]}
data: {"choices":[{"delta":{},"finish_reason":"stop","index":0}]}
data: [DONE]

Billing behavior

Streaming requests reserve an estimated amount before the first event is sent. When the stream finishes, ozeye finalizes actual usage and refunds unused reservation. If the provider fails before data is sent, the reservation is refunded.