Skip to main content
POST
/
api
/
v1
/
workflows
/
{workflow_id}
/
run
Run Workflow
curl --request POST \
  --url https://modelslab.com/api/v1/workflows/{workflow_id}/run

Documentation Index

Fetch the complete documentation index at: https://docs.modelslab.com/llms.txt

Use this file to discover all available pages before exploring further.

Workflow execution is asynchronous - you’ll receive an execution ID that you can use to poll for results.

Path Parameters

workflow_id
string
required
The workflow UUID

Request Body

The request body should contain the workflow parameters. Each workflow has different parameters based on its configuration. Use the Get Workflow Schema endpoint to discover available parameters.
{
  "prompt": "A beautiful sunset over mountains",
  "negative_prompt": "blurry, low quality",
  "width": 1024,
  "height": 1024
}

Response (202 Accepted)

{
  "status": "success",
  "message": "Workflow execution started.",
  "execution_id": 12345,
  "workflow_id": "uuid-string",
  "status_url": "https://modelslab.com/api/v1/workflows/uuid-string/runs/12345",
  "webhook_url": "https://your-webhook.com/callback"
}

Error Responses

  • 404 Not Found - Workflow not found or API not enabled
  • 422 Unprocessable Entity - Validation failed (missing required parameters)
  • 429 Too Many Requests - Rate limit exceeded