Skip to main content
After connecting a provider and creating a key, set stream to true to receive incremental server-sent events. Replace the example model with one available to your project:
On matching native routes, Aixy forwards the provider’s event stream without reconstruction. On translated routes, it emits incremental events in the requested client format. Choose a model that supports streaming and test the protocol your application uses.

Client behavior

  • Set a connection timeout separately from the total streaming timeout.
  • Process complete SSE events rather than assuming each network chunk is one event.
  • Treat provider error events and non-2xx HTTP responses as distinct failure paths.
  • Stop reading and close the connection when the end user cancels generation.
  • Record your X-Request-ID so an individual stream can be correlated with gateway telemetry.
Usage can arrive near the end of a provider stream. Do not estimate final billing solely from partial output observed by the client. Review pricing and cost attribution for final-usage settings, partial accounting, and hard-budget settlement.