Skip to main content

APIs

Streaming and Errors

KriyaOS chat APIs can stream responses so your UI can render tokens as they arrive. When something goes wrong, KriyaOS returns safe, user-facing error messages instead of leaking internal details.

Streaming Responses

Streaming is designed for interactive chat UIs. It reduces perceived latency because the user sees progress immediately.

Error Behavior

Errors fall into two broad categories:

  • validation and auth errors (returned as regular HTTP error responses)
  • runtime stream failures (masked to safe messages suitable for end users)

Design Goal

Streaming failures should not expose provider error payloads or internal stack traces to end users.