curl -X POST "https://api.danubeai.com/v1/workflows/wf_abc123/execute" \
-H "danube-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"inputs": {
"city": "San Francisco",
"channel": "#weather-alerts"
}
}'
from danube import DanubeClient
with DanubeClient(api_key="YOUR_API_KEY") as client:
execution = client.workflows.execute(
"wf_abc123",
inputs={"city": "San Francisco", "channel": "#weather-alerts"}
)
print(f"Status: {execution.status}")
for step in execution.step_results:
print(f" Step {step.step_number}: {step.status}")
{
"id": "exec_xyz789",
"workflow_id": "wf_abc123",
"user_id": "user_456",
"status": "success",
"inputs": {
"city": "San Francisco",
"channel": "#weather-alerts"
},
"step_results": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"status": "success",
"result": {
"forecast": "Partly cloudy, 18C, 10% chance of rain"
},
"error": null,
"execution_time_ms": 340
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"status": "success",
"result": {
"message_ts": "1708100000.000100"
},
"error": null,
"execution_time_ms": 210
}
],
"error": null,
"execution_time_ms": 550,
"started_at": "2026-02-16T12:00:00Z",
"completed_at": "2026-02-16T12:00:01Z",
"created_at": "2026-02-16T12:00:00Z"
}
Workflows
Execute Workflow
Run a workflow with the provided inputs
POST
/
v1
/
workflows
/
{workflow_id}
/
execute
curl -X POST "https://api.danubeai.com/v1/workflows/wf_abc123/execute" \
-H "danube-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"inputs": {
"city": "San Francisco",
"channel": "#weather-alerts"
}
}'
from danube import DanubeClient
with DanubeClient(api_key="YOUR_API_KEY") as client:
execution = client.workflows.execute(
"wf_abc123",
inputs={"city": "San Francisco", "channel": "#weather-alerts"}
)
print(f"Status: {execution.status}")
for step in execution.step_results:
print(f" Step {step.step_number}: {step.status}")
{
"id": "exec_xyz789",
"workflow_id": "wf_abc123",
"user_id": "user_456",
"status": "success",
"inputs": {
"city": "San Francisco",
"channel": "#weather-alerts"
},
"step_results": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"status": "success",
"result": {
"forecast": "Partly cloudy, 18C, 10% chance of rain"
},
"error": null,
"execution_time_ms": 340
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"status": "success",
"result": {
"message_ts": "1708100000.000100"
},
"error": null,
"execution_time_ms": 210
}
],
"error": null,
"execution_time_ms": 550,
"started_at": "2026-02-16T12:00:00Z",
"completed_at": "2026-02-16T12:00:01Z",
"created_at": "2026-02-16T12:00:00Z"
}
Overview
Executes a workflow by running each step sequentially. Each step calls a Danube tool and template variables are resolved with results from previous steps. Returns the full execution result including all step outcomes. Auth: Accepts either JWT or API key (danube-api-key header). Public workflows can be executed by any authenticated user; private workflows require ownership.
Path Parameters
Body Parameters
Your own idempotency key for this run. Sending the same value again returns the existing execution instead of starting another.
Response
For
execution_mode: "instructions", the hosted model’s final answer; null for template workflowsOn the free plan, hosted-AI workflow runs left after this one; null when the cap does not apply
Example
curl -X POST "https://api.danubeai.com/v1/workflows/wf_abc123/execute" \
-H "danube-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"inputs": {
"city": "San Francisco",
"channel": "#weather-alerts"
}
}'
from danube import DanubeClient
with DanubeClient(api_key="YOUR_API_KEY") as client:
execution = client.workflows.execute(
"wf_abc123",
inputs={"city": "San Francisco", "channel": "#weather-alerts"}
)
print(f"Status: {execution.status}")
for step in execution.step_results:
print(f" Step {step.step_number}: {step.status}")
{
"id": "exec_xyz789",
"workflow_id": "wf_abc123",
"user_id": "user_456",
"status": "success",
"inputs": {
"city": "San Francisco",
"channel": "#weather-alerts"
},
"step_results": [
{
"step_number": 1,
"tool_id": "tool_weather_001",
"tool_name": "Weather - Get Forecast",
"status": "success",
"result": {
"forecast": "Partly cloudy, 18C, 10% chance of rain"
},
"error": null,
"execution_time_ms": 340
},
{
"step_number": 2,
"tool_id": "tool_slack_001",
"tool_name": "Slack - Send Message",
"status": "success",
"result": {
"message_ts": "1708100000.000100"
},
"error": null,
"execution_time_ms": 210
}
],
"error": null,
"execution_time_ms": 550,
"started_at": "2026-02-16T12:00:00Z",
"completed_at": "2026-02-16T12:00:01Z",
"created_at": "2026-02-16T12:00:00Z"
}
MCP Tool
This endpoint is also available as theexecute_workflow MCP tool:
result = await mcp.call_tool("execute_workflow", {
"workflow_id": "wf_abc123",
"inputs": {"city": "San Francisco"}
})
