> For the complete documentation index, see [llms.txt](https://help.contouron.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.contouron.com/api/openapi-reference/video.md).

# Video

> For the complete documentation index, see [llms.txt](https://help.contouron.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.contouron.com/api/openapi-reference/video.md).

## Video

Endpoints related to video creation and management.

### Remove a video by ID

> Deletes a video by its ID. This is used to remove videos that are no longer needed or were created in error.

```json
{"openapi":"3.0.3","info":{"title":"Contouron API","version":"2.0.0"},"tags":[{"name":"video","description":"Endpoints related to video creation and management."}],"servers":[{"url":"https://backend.contouron.com","description":"Contouron API Server"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"contouron-api-key","in":"header"}}},"paths":{"/v2/videos/{id}":{"delete":{"summary":"Remove a video by ID","tags":["video"],"description":"Deletes a video by its ID. This is used to remove videos that are no longer needed or were created in error.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"Video ID"}],"responses":{"204":{"description":"Success","content":{"application/json":{"schema":{"description":"Success","type":"object","properties":{"id":{"description":"Video ID","type":"string"}},"required":["id"]}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"description":"Server error","type":"object","properties":{"code":{"type":"number"},"reqId":{"description":"Request ID for tracking","type":"string"},"message":{"description":"An error occurred","type":"string"}},"required":["message"]}}}}}}}}}
```

### Get a single video

> Retrieves the video by its ID. This is useful for polling after creating a video programmatically.

```json
{"openapi":"3.0.3","info":{"title":"Contouron API","version":"2.0.0"},"tags":[{"name":"video","description":"Endpoints related to video creation and management."}],"servers":[{"url":"https://backend.contouron.com","description":"Contouron API Server"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"contouron-api-key","in":"header"}}},"paths":{"/v2/videos/creations/{id}":{"get":{"summary":"Get a single video","tags":["video"],"description":"Retrieves the video by its ID. This is useful for polling after creating a video programmatically.","parameters":[{"schema":{"type":"string"},"in":"path","name":"id","required":true,"description":"Video ID"}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"description":"Video details","type":"object","properties":{"id":{"description":"Video ID","type":"string"},"status":{"description":"Current status of the video generation process","type":"string","enum":["queueing","generating-script","script-ready","generating-media","media-ready","exporting","done","creation-from-template-failed","insufficient-credits","draft"]},"error":{"description":"Optional error message if the video failed to generate.","type":"string"},"createdAt":{"description":"Creation timestamp of the video","format":"date-time","type":"string"},"mediaUrl":{"description":"Public URL of the final exported video media","type":"string","nullable":true},"imageUrls":{"description":"For slideshow exports, this will contain the images used in the video.","type":"array","items":{"type":"string"},"nullable":true}},"required":["id","status","createdAt","imageUrls"]}},"required":["item"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"description":"Not found","type":"object","properties":{"code":{"type":"number"},"reqId":{"description":"Request ID for tracking","type":"string"},"message":{"description":"Resource not found","type":"string"}},"required":["message"]}}}},"500":{"description":"Server error","content":{"application/json":{"schema":{"description":"Server error","type":"object","properties":{"code":{"type":"number"},"reqId":{"description":"Request ID for tracking","type":"string"},"message":{"description":"An error occurred","type":"string"}},"required":["message"]}}}}}}}}}
```

### Create a video from the new template system

> Creates a new video using a template. The template takes an ID and input parameters. You can also provide an optional prompt to fill out the input parameters automatically.

```json
{"openapi":"3.0.3","info":{"title":"Contouron API","version":"2.0.0"},"tags":[{"name":"video","description":"Endpoints related to video creation and management."}],"servers":[{"url":"https://backend.contouron.com","description":"Contouron API Server"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"contouron-api-key","in":"header"}}},"paths":{"/v2/videos/from-templates":{"post":{"summary":"Create a video from the new template system","tags":["video"],"description":"Creates a new video using a template. The template takes an ID and input parameters. You can also provide an optional prompt to fill out the input parameters automatically.","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"templateId":{"type":"string"},"inputs":{},"prompt":{"type":"string"},"isDraft":{"default":false,"type":"boolean"},"render":{"default":true,"type":"boolean"},"title":{"minLength":1,"type":"string"},"useBrandKit":{"default":false,"type":"boolean"},"brandId":{"type":"string","nullable":true}},"required":["templateId","inputs","render"]}}},"required":true},"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"item":{"type":"object","properties":{"id":{"description":"Video ID","type":"string"},"status":{"description":"Current status of the video generation process","type":"string","enum":["queueing","generating-script","script-ready","generating-media","media-ready","exporting","done","creation-from-template-failed","insufficient-credits","draft"]}},"required":["id","status"]}},"required":["item"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"description":"Not found","type":"object","properties":{"code":{"type":"number"},"reqId":{"description":"Request ID for tracking","type":"string"},"message":{"description":"Resource not found","type":"string"}},"required":["message"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"number"},"message":{"type":"string"}},"required":["message"]}}}}}}}}}
```

### List all templates

> List all available video templates along with the specification of their input parameters.

```json
{"openapi":"3.0.3","info":{"title":"Contouron API","version":"2.0.0"},"tags":[{"name":"video","description":"Endpoints related to video creation and management."}],"servers":[{"url":"https://backend.contouron.com","description":"Contouron API Server"}],"security":[{"apiKey":[]}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","name":"contouron-api-key","in":"header"}}},"paths":{"/v2/videos/templates":{"get":{"summary":"List all templates","tags":["video"],"description":"List all available video templates along with the specification of their input parameters.","parameters":[{"schema":{"default":"id,title,description","type":"string"},"in":"query","name":"fields","required":false,"description":"Comma separated list of fields to include. If provided, only these fields will be included in the response for each template. If omitted, only id, title, and description are included. Id is always included in the response."},{"schema":{"type":"string"},"in":"query","name":"search","required":false,"description":"Search regex term to filter templates by title or description. Has no effect if \"id\" is also provided."},{"schema":{"type":"string"},"in":"query","name":"id","required":false,"description":"If provided, only the template with this ID will be returned."}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{}}},"required":["items"]}}}},"500":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"number"},"message":{"type":"string"}},"required":["message"]}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://help.contouron.com/api/openapi-reference/video.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
