> ## Documentation Index
> Fetch the complete documentation index at: https://docs.magnific.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Video Depth API

> Convert a video into a per-frame depth video with Depth Anything. Use the grayscale output as a motion-only reference for Seedance 2.5, or pick a colour visualization.

Video Depth is an API that converts a video into a depth video: every frame becomes a map of how far each point is from the camera. Body pose, motion and camera movement are preserved; faces, clothing, colours and textures are not. That makes the output a motion-only reference: pass it to [Seedance 2.5 Pro](https://docs.magnific.com/api-reference/video/seedance-2-5-pro/overview.md) with images of a new subject, and the generation keeps the movement of the original clip without its identity.

### Key capabilities

* **Per-frame depth**: Every frame is converted with Depth Anything. In `grayscale`, near is light and far is dark
* **Same shape as the input**: The output is an MP4 (H.264) with the same resolution in pixels, frame rate and duration as the input, without an audio track
* **Four colormaps**: `grayscale` (default), or the colour visualizations `inferno`, `viridis` and `turbo`
* **Motion transfer**: The `grayscale` output is the format Seedance 2.5 reads as a motion reference in `reference_videos`
* **Async processing**: Webhook notifications or polling for task completion
* **Flexible input**: Accepts a publicly accessible HTTPS URL or an uploaded file reference (`upl_vid_...`)

### Use cases

* **Motion transfer without identity**: Reuse the performance of a clip (a dance, a gesture, a camera move) with a different character, product or style
* **Previsualization**: Block out movement with any footage and generate the final look afterwards
* **Depth visualization**: Produce colour depth videos for analysis, education or creative effects
* **Compositing**: Use the depth video as a matte for depth-based effects in your own pipeline

### Convert a video

Create a task by submitting a video. The service returns a task ID for async polling or webhook notification.

> [card] [POST /v1/ai/video-depth](https://docs.magnific.com/api-reference/video/video-depth/convert-video.md)
>
> Create a new video depth task

> [card] [GET /v1/ai/video-depth](https://docs.magnific.com/api-reference/video/video-depth/video-depth-tasks.md)
>
> List all video depth tasks

> [card] [GET /v1/ai/video-depth/\{task-id}](https://docs.magnific.com/api-reference/video/video-depth/task-by-id.md)
>
> Get task status and results by ID

### Parameters

| Parameter | Type | Required | Default | Description |
| - | - | - | - | - |
| `video` | `string` | Yes | - | Source video as a publicly accessible HTTPS URL or an uploaded file reference (`upl_vid_...`). At most 30 seconds and 200 MB |
| `colormap` | `string` | No | `"grayscale"` | Colormap of the output: `"grayscale"` (near is light, far is dark), `"inferno"`, `"viridis"` or `"turbo"` |
| `webhook_url` | `string` | No | - | URL for completion notification with task status and output URL |

### Motion transfer with Seedance 2.5

1. Convert your clip with `POST /v1/ai/video-depth`, keeping the default `grayscale` colormap.
2. When the task is `COMPLETED`, take the video URL from `generated`.
3. Call Seedance 2.5 Pro with that URL in `reference_videos`, images of the new subject in `reference_images`, and a `prompt` that describes the result.

The generated video follows the movement of your clip with the new subject. To keep the original subject as well as its motion, skip the conversion and pass the clip itself in `reference_videos`.

## Frequently Asked Questions

> [accordion] What is Video Depth and how does it work?
>
> Video Depth converts a video into a depth video with Depth Anything. You submit a video as a publicly accessible HTTPS URL (or an `upl_vid_` upload reference), receive a task ID, then poll for the result or receive a webhook notification. The output shows, frame by frame, how far each point is from the camera.

> [accordion] What are the limits of the input video?
>
> The input can be at most 30 seconds long and 200 MB. A longer or larger video is rejected with a `400` before anything is charged.

> [accordion] Which colormap should I use?
>
> Use `grayscale` (the default) when the depth video is a motion reference for Seedance 2.5. `inferno`, `viridis` and `turbo` show the same depth in colour and are meant for visualization.

> [accordion] Does the output keep the audio?
>
> No. The output has no audio track. It keeps the resolution in pixels, frame rate and duration of the input.

> [accordion] How is it billed?
>
> Per second of the input video, rounded up to the next whole second.

## Best practices

* **Trim before converting**: You pay per second of input, and the limit is 30 seconds, so send only the part whose motion you need
* **Keep the default colormap for motion transfer**: Seedance 2.5 reads the `grayscale` depth video as a motion reference
* **Use webhooks in production**: Pass `webhook_url` instead of polling


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.