Save run definitions under a name and start them with POST /v1/runs. Member and admin keys can use every endpoint on this page. See workflows for how saved fields and overrides combine.
Save a workflow
/v1/workflows/{name}_, . or -.promptstringrequiredmodelstringfilesarrayconnectionsobject{"ref": "<saved name>"} entries.descriptionstringinput_schemaobjectinput must match; a run that does not match is refused with 400. See describing inputs and outputs.output_schemaobjecttimeout_secondsintegershellbooleantrue when omitted.webboolean | objecttrue, or an object with allow and search. Off when omitted.A workflow cannot hold input, max_cost_micros or callback; those belong to each run. The response is {"name": "investigate-payment"}.
curl -X PUT $EPHEMERAL_URL/v1/workflows/investigate-payment \
-H "Authorization: Bearer $EPHEMERAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "Find out why this payment failed. Follow the playbook.",
"model": "anthropic/claude-haiku-5.5",
"files": [{ "file": "playbook.md" }],
"connections": { "payments": { "ref": "payments-api", "allowed_methods": ["GET"] } },
"timeout_seconds": 120,
"shell": false
}'Start a workflow
Send the workflow name to POST /v1/runs with the input and budget for this run. Any definition field you include replaces the saved value for this run; files and connections replace the whole collection.
curl $EPHEMERAL_URL/v1/runs \
-H "Authorization: Bearer $EPHEMERAL_API_KEY" \
-H "Content-Type: application/json" \
-d '{"workflow":"investigate-payment","input":{"payment_id":"pay_123"},"max_cost_micros":500000}'If the workflow does not exist, the request fails with 400 and the message saved workflow not found.
List workflows
/v1/workflowsname. Add ?detail=true to include each workflow's description, input_schema and output_schema when it has them. Fetch a workflow by name to see its whole definition.[{ "name": "investigate-payment" }, { "name": "weekly-report" }]With ?detail=true, an agent can see what each workflow expects and returns:
[
{
"name": "weather",
"description": "Current weather for a city. Input is a city name.",
"input_schema": { "type": "object", "required": ["city"], "properties": { "city": { "type": "string" } } },
"output_schema": { "type": "object", "required": ["city", "temperature_c", "summary"] }
},
{ "name": "weekly-report" }
]Get a workflow
/v1/workflows/{name}To edit a workflow, fetch it, change it and save it back with PUT; the response carries the new version. Credential fields you leave empty keep their stored values, as long as the connection's authentication type is unchanged.
Versions
Every save that changes a definition keeps a version, and the newest 50 are kept. Saving returns {"name": "...", "version": 3}. Workflows saved before versions existed are version 1.
/v1/workflows/{name}/versionslimit: {"name": "...", "items": [{ "version", "created_at", "current", "description", "model", "prompt_start" }]}./v1/workflows/{name}/versions/{version}version, created_at, current, description, model and the full definition, without credentials./v1/workflows/{name}/versions/{version}/restore{"name": "...", "version": 4, "restored_from": 2}. The versions in between are kept. Runs already started are not affected; schedules use it from their next start.Example workflows
/v1/examples{"items": [{ "name", "definition", "try_input" }]}. They are example-summarize-page, example-chart-report and example-watch-page. New organizations already have them./v1/examples{"names": [...]} limits it to some. Returns {"added": [...], "already_present": [...]}. An existing workflow is never changed.Delete a workflow
/v1/workflows/{name}204 No Content. Runs that already used it are not affected.