POST
/v1/tools/run_flowfreeRun a flow
Runs a chain of tools as one job at one price: quoted and rounded once on the whole chain, not charged if it fails, and Stop charges only the steps that finished. Give a saved flow by its name (flow_…), as calling that name does; the chain itself as definition, as save_flow takes it; or a chain one of Scrub’s skills gives, by its file, as skill_chain. Nothing is saved. quote gives its price first: a step {tool: "run_flow", arguments} with the same arguments.
Fields
| Field | Type | Default | What it is |
|---|---|---|---|
flow | string | None | A saved flow, by its name, flow_… |
definition | object | None | Or the chain itself, in place of flow: its inputs, params and steps, as save_flow takes them, each step an action or one of Scrub's tools on the chain's inputs or an earlier step's result (step.output). Not saved. |
skill_chain | string | None | Or a chain one of Scrub's skills gives, in place of flow or definition: the skill's name and the file's path in it, as its steps say (make-narrated-video/references/narrated-chain.json). Run as the skill defines it, never a copy. |
title | string | None | What the chain's run is called; its steps' names when left out, or its skill's title for a skill_chain |
arguments | object | Required | Its inputs and settings, by the names its inputs and params give them |
Call it
Request
curl -X POST https://app.scrub.app/v1/tools/run_flow \
-H "Authorization: Bearer $SCRUB_KEY" \
-H "Content-Type: application/json" \
-d '{"arguments":{}}'Answer
{
"ok": true,
"result": {
"…": "…"
}
}What result holds is said above.
Every call can also answer an error: what comes back. Try it with your key from Account.