v2
latestOpenAPI 3.1.02026-07-2670186350.6 KBfunctions
Stream Function
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)
post/functions/{function_id}/call/stream
Path parameters
function_idstring uuid required
The id of the function to call
The id of the function to call
Request body
Example request
{
"input": {
"x": 4,
"y": 5
},
"examples": [
{
"comment": "Adds two numbers",
"input": {
"x": 1,
"y": 3
},
"output": {
"sum": 4
}
}
],
"tags": {
"tag": "value"
}
}Response
Server-Sent Events stream of function execution chunks