Workflow ausführen
Führen Sie einen Workflow programmatisch über die API aus.
Endpoint
POST /api/v1/execute
Anfrage
Headers
| Header | Wert |
|---|---|
Authorization |
Bearer YOUR_API_KEY |
Content-Type |
application/json |
Body
{
"workflow_id": "wf_abc123",
"inputs": {
"prompt": "Analyze this text...",
"user_id": "user_456"
},
"async": false
}
| Feld | Typ | Beschreibung |
|---|---|---|
workflow_id |
string | Erforderlich. Der auszuführende Workflow |
inputs |
object | Eingabevariablen für den Workflow |
async |
boolean | Bei true wird sofort eine execution_id zurückgegeben |
Antwort
Synchron (async: false)
{
"success": true,
"execution_id": "exec_789",
"status": "completed",
"output": {
"result": "Analysis complete..."
},
"duration_ms": 1250
}
Asynchron (async: true)
{
"success": true,
"execution_id": "exec_789",
"status": "running"
}
Fragen Sie /api/v1/executions/{execution_id} ab, um den Status zu prüfen.