workflow_run
ManagementRun Workflow
Run a workflow.
Args:
- workflow_id: required
- inputs: input values for the run (the request body). For array-typed inputs (file_array, string_array, model_array) you may pass a bare scalar value and it will be wrapped into a single-element array before the call — the API's strict validator drops scalar-for-array mismatches silently.
- dry_run: optional — true returns a cost estimate without running or creating a job.
- team_id, project_id: required for OAuth callers
Returns: the workflow run result (with .job for tracking via job_check). With dry_run=true the response carries a cost estimate and no job is created.
Examples:
- "Run this workflow" -> workflow_id="workflow_xxx", inputs={...}
- "Estimate cost without running" -> workflow_id="workflow_xxx", inputs={...}, dry_run=true
open-world
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workflow_id | string | ✓ | Workflow ID. |
| inputs | record | — | Input values for the run — body of the workflow execution request. |
| dry_run | boolean | — | Estimate cost without running. |
| team_id | string | — | Team ID. Required if user belongs to multiple teams. |
| project_id | string | — | Project ID to scope the operation to. |
| response_format | enum(json | markdown) | json | Output format: 'json' for structured data, 'markdown' for human-readable text. |
Example Request
JSON
{
"workflow_id": "wf_hero_pipeline",
"inputs": {
"prompt": "epic fantasy hero portrait",
"style_model_id": "model_custom_abc"
},
"team_id": "team_abc123",
"project_id": "proj_xyz789"
}Example Response
JSON
{
"workflow": {
"id": "wf_hero_pipeline",
"status": "running",
"jobId": "job_wf_001"
}
}Common Use Cases
- Execute a multi-step generation pipeline in a single call
- Dry-run a workflow to estimate credit cost before executing