Workflow Endpoints

Direct workflow control — Tier 3. For power agents that want to pick a specific workflow and control individual parameters.

Info
Most agents should use POST /generate (Tier 1) instead. Tier 3 is for when you need explicit control over which pipeline runs and with what parameters.

GET /workflows

List all available workflows with their template slots.

Response
{
  "workflows": [
    {
      "id": "wf_flux_product",
      "name": "FLUX Product Photography",
      "category": "product_photography",
      "template_slots": {
        "prompt": { "type": "string", "required": true },
        "negative_prompt": { "type": "string", "default": "" },
        "width": { "type": "int", "default": 1024 },
        "height": { "type": "int", "default": 1024 },
        "seed": { "type": "int", "default": -1 }
      },
      "token_cost": 10
    }
  ]
}

POST /workflows/{id}/run

Run a specific workflow with explicit slot values.

Request
POST /workflows/wf_flux_product/run
{
  "slots": {
    "prompt": "Wireless earbuds on white marble, soft studio lighting",
    "negative_prompt": "blurry, low quality",
    "width": 1024,
    "height": 1024
  }
}
Response
{
  "job_id": "j_x9k2m4",
  "status": "running",
  "workflow_id": "wf_flux_product",
  "workflow_name": "FLUX Product Photography"
}

GET /jobs/{id}

Poll job status until completion.

Response
{
  "job_id": "j_x9k2m4",
  "status": "completed",
  "output_assets": [...],
  "elapsed_seconds": 14.2
}