---
title: "Drain a stream session's processed results (pull delivery)"
method: POST
path: "/v1/stream/output"
tags: ["Stream"]
---

# Drain a stream session's processed results (pull delivery)

`POST /v1/stream/output`

## Request

- Base URL: `http://localhost:9998`
- URL: `http://localhost:9998/v1/stream/output`
- Auth: HTTP bearer

Drains the bounded per-session buffer of processed results the session retains, returning each processed frame exactly once. JSON processors (pose, OCR, classify, faces, barcodes, saliency, animals) return their structured `result`; the upscale processor reports `binary_bytes`. A streaming SSE/WS push is not yet built (see docs/features/mocap-skeleton.md Known Issues).

## Request body

- object
  - `session_id` string, required: Session id returned by POST /v1/stream/start.

## Response `200`

The drained results (possibly empty since the last drain)

- object
  - `session_id` string
  - `count` integer
  - `results` object[]
    - `frame` integer
    - `result` object
    - `binary_bytes` integer

## Other responses

- `404`: No active stream session with that id
- `503`: Stream processing service not initialized

---

[API](https://skmtc.dev/modelpiper/apis/toolpiper-api.md) · [All operations](https://skmtc.dev/modelpiper/apis/toolpiper-api/llms.txt) · [OpenAPI document](https://skmtc.dev/modelpiper/apis/toolpiper-api/revisions/6722bf56385c?raw)
