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

# Get Video Generation

> Retrieve the status and result of a BytePlus video generation task.

Returns from DB when the task is in a terminal state. Otherwise polls
BytePlus live and syncs the DB row.

Poll until ``status`` is one of:
``succeeded`` — ``content.video_url`` is populated,
``failed`` — check ``error`` field,
``expired`` — task timed out.



## OpenAPI

````yaml /api/openapi.json get /v1/video/generations/{task_id}
openapi: 3.1.0
info:
  title: MeshAPI
  description: One key, all AI models.
  version: 0.1.0
servers:
  - url: https://api.meshapi.ai
security:
  - BearerAuth: []
paths:
  /v1/video/generations/{task_id}:
    get:
      tags:
        - Video
      summary: Get Video Generation
      description: |-
        Retrieve the status and result of a BytePlus video generation task.

        Returns from DB when the task is in a terminal state. Otherwise polls
        BytePlus live and syncs the DB row.

        Poll until ``status`` is one of:
        ``succeeded`` — ``content.video_url`` is populated,
        ``failed`` — check ``error`` field,
        ``expired`` — task timed out.
      operationId: get_video_generation
      parameters:
        - name: task_id
          in: path
          required: true
          schema:
            type: string
            title: Task Id
        - in: header
          name: X-Mesh-Version
          required: false
          schema:
            type: string
            enum:
              - 2026-08
            default: 2026-08
          example: 2026-08
          description: >-
            Dated version of the API contract to pin this request to. Omit it
            and the request is served under `2026-08` — the oldest supported
            version, so an existing integration is never moved by a release. A
            malformed or unsupported value is rejected with `400
            invalid_api_version` rather than falling back silently. The version
            actually served is echoed as `X-Mesh-Version` on every response,
            including errors.
      responses:
        '200':
          description: Task status and result when succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTaskResponse'
              examples:
                default:
                  summary: Example response
                  value:
                    id: vid_01JZ0S8R7G5A4N3C2V1B0M9K8J
                    model: byteplus/dreamina-seedance-2-0
                    status: succeeded
                    error: null
                    created_at: 1783001227
                    updated_at: 1783001527
                    content:
                      video_url: >-
                        https://storage.example.com/video/vid_01JZ0S8R7G5A4N3C2V1B0M9K8J.mp4
                    seed: 12345
                    resolution: 720p
                    ratio: '16:9'
                    duration: 5
                    frames: null
                    framespersecond: 24
                    generate_audio: true
                    safety_identifier: null
                    priority: null
                    draft: null
                    draft_task_id: null
                    service_tier: null
                    execution_expires_after: null
                    usage:
                      prompt_tokens: 0
                      completion_tokens: 0
                      total_tokens: 0
        '401':
          description: Missing or invalid API key
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '502':
          description: BytePlus upstream error
      security:
        - BearerAuth: []
components:
  schemas:
    VideoTaskResponse:
      properties:
        id:
          type: string
          title: Id
        model:
          anyOf:
            - type: string
            - type: 'null'
          title: Model
        status:
          type: string
          title: Status
          default: queued
        error:
          anyOf:
            - $ref: '#/components/schemas/VideoTaskError'
            - type: 'null'
        created_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Updated At
        content:
          anyOf:
            - $ref: '#/components/schemas/VideoTaskContent'
            - type: 'null'
        seed:
          anyOf:
            - type: integer
            - type: 'null'
          title: Seed
        resolution:
          anyOf:
            - type: string
            - type: 'null'
          title: Resolution
        ratio:
          anyOf:
            - type: string
            - type: 'null'
          title: Ratio
        duration:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration
        frames:
          anyOf:
            - type: integer
            - type: 'null'
          title: Frames
        framespersecond:
          anyOf:
            - type: integer
            - type: 'null'
          title: Framespersecond
        generate_audio:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Generate Audio
        safety_identifier:
          anyOf:
            - type: string
            - type: 'null'
          title: Safety Identifier
        priority:
          anyOf:
            - type: integer
            - type: 'null'
          title: Priority
        draft:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Draft
        draft_task_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Draft Task Id
        service_tier:
          anyOf:
            - type: string
            - type: 'null'
          title: Service Tier
        execution_expires_after:
          anyOf:
            - type: integer
            - type: 'null'
          title: Execution Expires After
        usage:
          anyOf:
            - $ref: '#/components/schemas/VideoTaskUsage'
            - type: 'null'
      type: object
      required:
        - id
      title: VideoTaskResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    VideoTaskError:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
        - code
        - message
      title: VideoTaskError
    VideoTaskContent:
      properties:
        video_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Video Url
        last_frame_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Frame Url
      type: object
      title: VideoTaskContent
    VideoTaskUsage:
      properties:
        completion_tokens:
          type: integer
          title: Completion Tokens
        total_tokens:
          type: integer
          title: Total Tokens
      type: object
      required:
        - completion_tokens
        - total_tokens
      title: VideoTaskUsage
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Enter your MeshAPI key (`rsk_...`) — sent as `Authorization: Bearer
        <key>`.

````