Create Template Run
Start a run of a flows template. Pass version_id to pin a snapshot, or omit it / pass latest to run the latest published version. Set input values under inputs, keyed by input port id. The response is the run in its initial state, with every output already listed under its port id in outputs. Include webhook to receive a flows_template_run event carrying the finished run once its status is completed or failed; this is the recommended way to wait. Without one, fetch GET /v1/flows/templates/{template_id}/runs/{run_id} at a modest interval until the status is terminal.
Path parameters
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.
Headers
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.
Request body
Example request
{
"inputs": {
"prompt": "a corgi on a surfboard",
"reference": {
"asset_id": "5xM2KqOnZyce22SPZ9d4",
"type": "asset"
}
},
"version_id": "latest",
"webhook": {
"type": "all"
}
}Response
Successful Response
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
- ○
endpoint added
endpoint-added
This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○