Skip to content

Streaming

Preview

Receive tokens as they are produced, in one event format regardless of which provider answered.

Last updated 2026-07-24

Preview: This endpoint ships with the API launch. The shape below is the interface we are building to. It is documented now so you can plan an integration, not so you can call it today.

Setting stream: true returns server-sent events instead of a single response body. Each event carries an incremental delta; the stream terminates with a final event containing usage totals. For interactive applications this is the difference between a product that feels alive and one that feels stalled. First-token latency, not total latency, is what users perceive.

Providers emit meaningfully different event streams. Webparam normalises them into one format, which also means a mid-stream provider failure can be handled by the gateway rather than surfacing to your application as a truncated response.

Consuming the stream

curl -N https://api.webparam.com/v1/chat/completions \
  -H "Authorization: Bearer $WEBPARAM_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "openai/gpt-5.1-mini",
    "messages": [{ "role": "user", "content": "Write a haiku about latency" }],
    "stream": true
  }'

Illustrative: API not yet live

Warning: Not every capability streams identically across providers: tool calls and reasoning tokens arrive as distinct event types. Design your consumer to ignore event types it does not recognise rather than to assume a fixed sequence.

While the API is in build, you can explore the same models two ways: ask Echo how a request and response fit together, or browse the catalogue to compare pricing, context and capabilities.