manage_workflows
ManagementManage Workflows
CRUD and execution for visual workflows. Actions: list, get, create, update, delete, run, approve, reject. Args: - action: required operation (see above) - workflow_id: required for get, update, delete, run, approve, reject - name, description, definition: used for create or update - inputs, dry_run: used for run - workflow_job_id, node_id: required for approve and reject - team_id, project_id: required for OAuth callers Returns: workflow metadata for CRUD calls, workflow run results for run, and approval results for approve/reject. Examples: - "List workflows" -> action="list" - "Run this workflow" -> action="run", workflow_id="workflow_xxx", inputs={...} - "Approve this workflow node" -> action="approve", workflow_id="workflow_xxx", workflow_job_id="job_xxx", node_id="node_xxx" Don't use when: You only need a single model invocation. Prefer run_model instead.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| action | enum(list | get | create | update | delete | run | approve | reject) | ✓ | Workflow action: list, get, create, update, delete, run, approve, or reject. |
| workflow_id | string | — | Workflow ID (required for most actions). |
| name | string | — | Workflow name (for create/update). |
| description | string | — | Workflow description (for create/update). |
| definition | record | — | Workflow definition (for create/update). |
| inputs | record | — | Input values for run. |
| dry_run | boolean | — | Estimate cost without running. |
| workflow_job_id | string | — | Job ID (for approve/reject). |
| node_id | string | — | Node ID (for approve/reject). |
| 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
{
"action": "run",
"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
{
"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
- Approve or reject a human-in-the-loop node in a paused workflow
- Create and manage reusable workflow definitions for repeatable pipelines