Endpoints
Run a flow
POST /api/run/{flow} runs a flow with an input, optional tweaks and a session, and returns or streams its outputs.
POST /api/run/{flow_id_or_name}{flow_id_or_name} is the flow's id (in the canvas address bar) or its endpoint name.
Example
curl -X POST "https://app.chainz.waiyers.com/api/run/$FLOW_ID" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input_value": "Summarise the news about solar panels",
"input_type": "chat",
"output_type": "chat"
}'Body
| Field | Type | What it is |
|---|---|---|
input_value | string | The value given to the flow's input component. |
input_type | string | Which input component receives the value: chat (default), text or any. |
output_type | string | Which outputs to return: chat (default), text, any or debug (every component's output). |
output_component | string | When the flow has several outputs, the id of the one to return. |
tweaks | object | Settings to change for this run only, keyed by component id. |
session_id | string | Keeps a conversation going across runs: send the same id each time. |
Tweaks
Change a component's setting for one run, without editing the flow. The key is the component's id (its type and a short code, as in Get a flow), the value its fields:
{
"input_value": "Write a caption for our new bottle",
"tweaks": {
"WaiyersModelCall-a1b2c": { "temperature": 0.2 }
}
}Streaming
Add ?stream=true to receive the result as it is produced, as server-sent events:
| Event | Carries |
|---|---|
add_message | A new message of the run. |
token | A piece of text, as the model writes it. |
end | The final result. |
Who can run a flow
You, and the members of the team that owns the flow's workspace. Others get 403.
Cost
A run through the API costs the same as in the app and appears in History with the others. See Credits.
Was this page helpful?
Last updated 2026-10-13