---
title: "Stream structured JSON objects via SSE"
method: POST
path: "/stream-object"
tags: ["Streaming"]
---

# Stream structured JSON objects via SSE

`POST /stream-object`

Streams partial JSON objects as they're generated using Server-Sent Events (SSE). Provides real-time streaming of structured data with partial object parsing. Event types: session (session ID), partial-object (partial JSON with parsed object), object (final validated object), result (final usage stats), error (errors), done (stream complete).

## Request body

- object
  - `system` string
  - `prompt` string, required
  - `sessionId` string
  - `model` string
  - `allowedTools` string[]
  - `schema` object, required
    - `type` 'object' | 'array' | 'string' | 'number' | 'integer' | 'boolean' | 'null'
    - `properties` object
    - `items` unknown
    - `$ref` string
    - `allOf` unknown[]
      - unknown
    - `anyOf` unknown[]
      - unknown
    - `oneOf` unknown[]
      - unknown
    - `enum` unknown[]
      - unknown
    - `const` unknown

## Response `200`

SSE stream with real-time partial JSON objects

## 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-27** `3575d0f3e416` — 1 info
  - endpoint added
- **2025-12-24** `62c4085e0ca0` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/pattern-zones-co/apis/koine-gateway-api/changes/stream-object/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)
