Skip to main content
GET
https://modelslab.com
/
api
/
v1
/
workflows
/
{workflow_id}
/
runs
/
{execution_id}
Get Execution Status
curl --request GET \
  --url https://modelslab.com/api/v1/workflows/{workflow_id}/runs/{execution_id}

Path Parameters

workflow_id
string
required
The workflow UUID
execution_id
integer
required
The execution ID

Response (Pending/Running)

{
  "status": "success",
  "execution": {
    "id": 12345,
    "workflow_id": "uuid-string",
    "status": "running",
    "started_at": "2024-01-15T10:30:00Z",
    "completed_at": null,
    "execution_time": null
  },
  "steps": [
    {
      "name": "Text to Image",
      "status": "completed",
      "started_at": "2024-01-15T10:30:00Z",
      "completed_at": "2024-01-15T10:30:05Z"
    },
    {
      "name": "Image Upscaler",
      "status": "running",
      "started_at": "2024-01-15T10:30:05Z",
      "completed_at": null
    }
  ]
}

Response (Completed)

{
  "status": "success",
  "execution": {
    "id": 12345,
    "workflow_id": "uuid-string",
    "status": "completed",
    "started_at": "2024-01-15T10:30:00Z",
    "completed_at": "2024-01-15T10:30:15Z",
    "execution_time": 15.234
  },
  "output": {
    "output": ["https://cdn.modelslab.com/generated/image1.png"],
    "proxy_links": ["https://cdn.modelslab.com/proxy/image1.png"],
    "status": "success"
  },
  "steps": [
    {
      "name": "Text to Image",
      "status": "completed",
      "started_at": "2024-01-15T10:30:00Z",
      "completed_at": "2024-01-15T10:30:05Z"
    },
    {
      "name": "Image Upscaler",
      "status": "completed",
      "started_at": "2024-01-15T10:30:05Z",
      "completed_at": "2024-01-15T10:30:15Z"
    }
  ]
}

Response (Failed)

{
  "status": "success",
  "execution": {
    "id": 12345,
    "workflow_id": "uuid-string",
    "status": "failed",
    "started_at": "2024-01-15T10:30:00Z",
    "completed_at": "2024-01-15T10:30:05Z",
    "execution_time": 5.123
  },
  "error": "Image generation failed: Invalid prompt",
  "steps": [
    {
      "name": "Text to Image",
      "status": "failed",
      "started_at": "2024-01-15T10:30:00Z",
      "completed_at": "2024-01-15T10:30:05Z"
    }
  ]
}

Execution Statuses

StatusDescription
pendingExecution is queued
runningExecution is in progress
completedExecution finished successfully
failedExecution encountered an error
cancelledExecution was cancelled by the user