> ## 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 - Convert a video into a depth video

> Converts a video into a per-frame depth video with Depth Anything: every frame becomes a map of how far each point is from the camera (in `grayscale`, near is light and far is dark).
Body pose, motion and camera movement are preserved; faces, clothing, colours and textures are not.

**Motion transfer with Seedance 2.5.** The `grayscale` output works as a motion-only reference: pass its URL in `reference_videos` of Seedance 2.5, together with reference images of the new subject, and the generation keeps the movement of the original clip without its identity.

**Output.** An MP4 (H.264) depth video with the same resolution in pixels, frame rate and duration as the input, without an audio track.
The task is asynchronous: poll `GET /v1/ai/video-depth/{task-id}` or pass `webhook_url`, and read the video URL from `generated` once the task is `COMPLETED`.

Billed per second of the input video, rounded up. The input must be at most 30 seconds and 200 MB.




## OpenAPI

````yaml post /v1/ai/video-depth
openapi: 3.0.0
info:
  description: >-
    The Magnific API is your gateway to a vast collection of high-quality
    digital resources for your applications and projects. As a leading platform,
    it offers a wide range of graphics, including vectors, photos,
    illustrations, icons, PSD templates, and more, all curated by talented
    designers from around the world.
  title: Magnific API
  version: 1.0.0
servers:
  - description: B2B API Production V1
    url: https://api.magnific.com
security:
  - magnificApiKey: []
paths:
  /v1/ai/video-depth:
    post:
      tags:
        - video-depth
      summary: Video Depth - Convert a video into a depth video
      description: >
        Converts a video into a per-frame depth video with Depth Anything: every
        frame becomes a map of how far each point is from the camera (in
        `grayscale`, near is light and far is dark).

        Body pose, motion and camera movement are preserved; faces, clothing,
        colours and textures are not.


        **Motion transfer with Seedance 2.5.** The `grayscale` output works as a
        motion-only reference: pass its URL in `reference_videos` of Seedance
        2.5, together with reference images of the new subject, and the
        generation keeps the movement of the original clip without its identity.


        **Output.** An MP4 (H.264) depth video with the same resolution in
        pixels, frame rate and duration as the input, without an audio track.

        The task is asynchronous: poll `GET /v1/ai/video-depth/{task-id}` or
        pass `webhook_url`, and read the video URL from `generated` once the
        task is `COMPLETED`.


        Billed per second of the input video, rounded up. The input must be at
        most 30 seconds and 200 MB.
      operationId: postAiVideoDepth
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/request-content_4'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/get_style_transfer_task_status_200_response
          description: OK - Task created.
        '400':
          $ref: '#/components/responses/400-bad-request'
        '401':
          $ref: '#/components/responses/401-unauthorized'
        '500':
          $ref: '#/components/responses/500-internal-server-error'
        '503':
          $ref: '#/components/responses/503-service-unavailable'
components:
  schemas:
    request-content_4:
      properties:
        video:
          description: >
            Source video. A publicly accessible HTTPS URL pointing to the video,
            or an uploaded file reference (`upl_vid_...`). At most 30 seconds
            and 200 MB.
          type: string
        colormap:
          $ref: '#/components/schemas/colormap'
        webhook_url:
          description: >
            Optional callback URL that will receive asynchronous notifications
            when the task changes status.

            The webhook will be called with the task status and the depth video
            URL.
          format: uri
          type: string
      required:
        - video
      type: object
    get_style_transfer_task_status_200_response:
      example:
        data:
          generated:
            - https://openapi-generator.tech
            - https://openapi-generator.tech
          task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
          status: CREATED
      properties:
        data:
          $ref: '#/components/schemas/task-detail'
      required:
        - data
      type: object
    colormap:
      default: grayscale
      description: >
        Colormap of the output depth video:

        - `grayscale`: near is light, far is dark (default). The format Seedance
        2.5 reads as a motion reference.

        - `inferno`, `viridis`, `turbo`: colour visualizations of the same
        depth.
      enum:
        - grayscale
        - inferno
        - viridis
        - turbo
      type: string
    task-detail:
      allOf:
        - $ref: '#/components/schemas/task'
        - properties:
            generated:
              items:
                description: URL of the generated image
                format: uri
                type: string
              type: array
          required:
            - generated
          type: object
      example:
        generated:
          - https://openapi-generator.tech
          - https://openapi-generator.tech
        task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        status: CREATED
    inline_object:
      example:
        message: message
        request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
      properties:
        request_id:
          description: >-
            Identifier of the HTTP request, the same value as the `X-Request-Id`
            response header. The API gateway adds it to every error response of
            the public API (`/v1` on `api.magnific.com` and `api.magnific.com`),
            so it is absent when a service is called directly, without the
            gateway. Include it when you contact support. It identifies the
            request, not a task.
          example: ak-97f5c07b9dd04324842b8f8b55a0edf1
          type: string
        message:
          type: string
      type: object
    inline_object_1:
      properties:
        request_id:
          description: >-
            Identifier of the HTTP request, the same value as the `X-Request-Id`
            response header. The API gateway adds it to every error response of
            the public API (`/v1` on `api.magnific.com` and `api.magnific.com`),
            so it is absent when a service is called directly, without the
            gateway. Include it when you contact support. It identifies the
            request, not a task.
          example: ak-97f5c07b9dd04324842b8f8b55a0edf1
          type: string
        message:
          example: Validation error
          type: string
        invalid_params:
          items:
            $ref: '#/components/schemas/inline_object_1_invalid_params_inner'
          type: array
      required:
        - invalid_params
        - message
      type: object
    inline_object_2:
      example:
        message: Internal Server Error
        request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
      properties:
        request_id:
          description: >-
            Identifier of the HTTP request, the same value as the `X-Request-Id`
            response header. The API gateway adds it to every error response of
            the public API (`/v1` on `api.magnific.com` and `api.magnific.com`),
            so it is absent when a service is called directly, without the
            gateway. Include it when you contact support. It identifies the
            request, not a task.
          example: ak-97f5c07b9dd04324842b8f8b55a0edf1
          type: string
        message:
          example: Internal Server Error
          type: string
      type: object
    inline_object_3:
      example:
        message: Service Unavailable. Please try again later.
        request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
      properties:
        request_id:
          description: >-
            Identifier of the HTTP request, the same value as the `X-Request-Id`
            response header. The API gateway adds it to every error response of
            the public API (`/v1` on `api.magnific.com` and `api.magnific.com`),
            so it is absent when a service is called directly, without the
            gateway. Include it when you contact support. It identifies the
            request, not a task.
          example: ak-97f5c07b9dd04324842b8f8b55a0edf1
          type: string
        message:
          example: Service Unavailable. Please try again later.
          type: string
      type: object
    task:
      example:
        task_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91
        status: CREATED
      properties:
        task_id:
          description: Task identifier
          format: uuid
          type: string
        status:
          description: Task status
          enum:
            - CREATED
            - IN_PROGRESS
            - COMPLETED
            - FAILED
          type: string
      required:
        - status
        - task_id
      type: object
    inline_object_1_invalid_params_inner:
      properties:
        name:
          description: Name of the invalid parameter.
          example: page
          type: string
        field:
          description: Field of the invalid parameter. Mirrors `name`.
          example: page
          type: string
        reason:
          example: Parameter 'page' must be greater than 0
          type: string
      required:
        - field
        - name
        - reason
      type: object
  responses:
    400-bad-request:
      content:
        application/json:
          examples:
            invalid_page:
              summary: Parameter 'page' is not valid
              value:
                request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
                message: Parameter 'page' must be greater than 0
            invalid_query:
              summary: Parameter 'query' is not valid
              value:
                request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
                message: Parameter 'query' must not be empty
            invalid_filter:
              summary: Parameter 'filter' is not valid
              value:
                request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
                message: Parameter 'filter' is not valid
            generic_bad_request:
              summary: Bad Request
              value:
                request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
                message: Parameter ':attribute' is not valid
          schema:
            $ref: '#/components/schemas/inline_object'
        application/problem+json:
          examples:
            invalid_page:
              summary: Parameter 'page' is not valid
              value:
                request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
                message: Validation error
                invalid_params:
                  - name: page
                    field: page
                    reason: Parameter 'page' must be greater than 0
                  - name: per_page
                    field: per_page
                    reason: Parameter 'per_page' must be greater than 0
          schema:
            $ref: '#/components/schemas/inline_object_1'
      description: >-
        Bad Request - The server could not understand the request due to invalid
        syntax.
    401-unauthorized:
      content:
        application/json:
          examples:
            invalid_api_key:
              summary: API key is not valid
              value:
                request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
                message: Invalid API key
            missing_api_key:
              summary: API key is not provided
              value:
                request_id: ak-97f5c07b9dd04324842b8f8b55a0edf1
                message: Missing API key
          schema:
            $ref: '#/components/schemas/inline_object'
      description: >-
        Unauthorized - The client must authenticate itself to get the requested
        response.
    500-internal-server-error:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/inline_object_2'
      description: >-
        Internal Server Error - The server has encountered a situation it
        doesn't know how to handle.
    503-service-unavailable:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/inline_object_3'
      description: Service Unavailable
  securitySchemes:
    magnificApiKey:
      description: >
        Your Magnific API key. Required for authentication. [Learn how to obtain
        an API key](https://docs.magnific.com/quickstart)
      in: header
      name: x-magnific-api-key
      type: apiKey

````

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