---
title: "Stream text response via SSE"
method: POST
path: "/stream"
tags: ["Streaming"]
---

# Stream text response via SSE

`POST /stream`

Streams Claude CLI output using Server-Sent Events (SSE). Provides real-time streaming of Claude's response with session management and usage tracking. Event types: session (session ID), text (streaming content), result (final usage stats), error (errors), done (stream complete).

## Request body

- object
  - `system` string
  - `prompt` string, required
  - `sessionId` string
  - `model` string
  - `allowedTools` string[]

## Response `200`

SSE stream with real-time Claude CLI output

## Other responses

- `400` — Validation error
- `401` — Missing authorization header
- `403` — Invalid API key

## Changes

- **2026-07-17** `f7074f1efbee` — 1 warning, 1 info
  - added the new `NO_TOOLS_AVAILABLE` enum value to the `code` response property for the response status `400`
  - added the new optional request property `allowedTools`
- **2025-12-27** `b62b4ac2e1b7` — 1 warning
  - removed the request property `userEmail`
- **2025-12-26** `5a0fb0ffd413` — 1 warning
  - added the new `CONCURRENCY_LIMIT_ERROR` enum value to the `code` response property for the response status `400`
- **2025-12-24** `62c4085e0ca0` — 1 warning, 3 info
  - removed the request property `allowedTools`
  - added the new optional request property `userEmail`
  - removed the `CONCURRENCY_LIMIT_ERROR` enum value from the `code` response property for the response status `400`
  - removed the `NO_TOOLS_AVAILABLE` enum value from the `code` response property for the response status `400`

[Change history](https://skmtc.dev/pattern-zones-co/apis/koine-gateway-api/changes/stream/post.md)

---

[API](https://skmtc.dev/pattern-zones-co/apis/koine-gateway-api.md) · [All operations](https://skmtc.dev/pattern-zones-co/apis/koine-gateway-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/pattern-zones-co/koine-gateway-api/revisions/f7074f1efbee/schema)
