Flows
Templates

Get Template Run

Retrieve a template run: its status, rolled up from its outputs, and each output's own status and download URL once completed.

get/v1/flows/templates/{template_id}/runs/{run_id}

Path parameters

template_idstring required

The ID of the template, as shown in the ElevenLabs app or by GET /v1/flows/templates.

The ID of the template, as shown in the ElevenLabs app or by GET /v1/flows/templates.

run_idstring required

Headers

xi-api-keystring nullable

Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

Response

Successful Response

idstring required

The unique identifier of the run.

template_idstring required

The template this run executed, so a webhook consumer running several templates can tell their runs apart without keeping a run-to-template map.

version_idstring required

The template version this run executed. Resolved when the run is created, so a run started with latest records the concrete version it ran.

status'pending' | 'generating' | 'completed' | 'failed' required

Where a run, or one of its outputs, is in its lifecycle. The run's is rolled up from its outputs' (aggregate_output_statuses). A class rather than a Literal so it publishes as one named enum instead of being inlined into every kind.

outputsobject required

The run's outputs, keyed by output port id. Each is a TemplateOutput discriminated on type, the type of its port's content_schema.

Example response

{
  "id": "sess_JWr5N6X9ZTqf8jD2LmQb",
  "outputs": {
    "marketing_title": {
      "content": "Ride the wave.",
      "id": "Kx2mP7Y4WVrg9kE3NnRc",
      "status": "completed",
      "type": "string"
    },
    "product_demo": {
      "id": "QWr5N6X9ZTqf8jD2La3B",
      "status": "generating",
      "type": "video"
    },
    "product_still": {
      "content_mime_type": "image/png",
      "content_url": "https://storage.googleapis.com/generations/JWr5N6X9ZTqf8jD2LmQb",
      "id": "JWr5N6X9ZTqf8jD2LmQb",
      "status": "completed",
      "type": "image"
    }
  },
  "status": "generating",
  "template_id": "tmpl_abc123",
  "version_id": "ver_01hxyz"
}

Changes

Changed in 1 of the 49 revisions of this API.1