---
title: "Stream Function"
method: POST
path: "/functions/{function_id}/call/stream"
tags: ["functions"]
---

# Stream Function

`POST /functions/{function_id}/call/stream`

Stream a function call execution in real-time using Server-Sent Events (SSE).

This endpoint returns a continuous stream of Server-Sent Event objects as the function executes,
allowing for real-time streaming of responses. The response follows the Server-Sent Events
specification with proper event structure for SDK compatibility.

Each Server-Sent Event contains:
- `id`: Optional event identifier
- `event`: Optional event type
- `data`: JSON payload with streaming chunk information
- `retry`: Optional retry interval

The data payload includes:
- `delta`: Incremental text content (if any)
- `span_id`: Unique identifier for the execution span (when available)

## Path parameters

- `function_id` string, uuid, required — The id of the function to call

## Request body

- AppApiPublicV2FunctionsCallFunctionRequest
  - `input` unknown
  - `parent_span_id` string, uuid, nullable
  - `examples` ExampleIn[], nullable
    - `input` unknown, required
    - `output` unknown, required
    - `comment` string, nullable
  - `tags` object, nullable — Tags to add to the call event

## Response `200`

Server-Sent Events stream of function execution chunks

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `402` — Payment Required (out of credits)
- `404` — Not Found
- `422` — Request Validation Error

---

[API](https://skmtc.dev/opper/apis/opper-api-v2.md) · [All operations](https://skmtc.dev/opper/apis/opper-api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/opper/opper-api-v2/revisions/d3ccdaa15678/schema)
