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

# Get video task

> Returns a task created with the same user. Reading a finished task settles its charge if that has not happened yet; tasks are settled when they finish whether or not they are read.



## OpenAPI

````yaml /openapi.json get /api/v3/contents/generations/tasks/{id}
openapi: 3.1.0
info:
  title: OmniRelay API
  version: 1.0.0
  description: >-
    OpenAI-compatible gateway for reviewed real text models. Access is
    workspace-specific; query your own model list for capabilities and customer
    prices.
servers:
  - url: https://api.omnirelay.ai
security:
  - bearerAuth: []
tags:
  - name: Service
  - name: Models
  - name: Chat
  - name: Management
  - name: Responses
  - name: Embeddings
  - name: Images
  - name: Videos
paths:
  /api/v3/contents/generations/tasks/{id}:
    get:
      tags:
        - Videos
      summary: Get video task
      description: >-
        Returns a task created with the same user. Reading a finished task
        settles its charge if that has not happened yet; tasks are settled when
        they finish whether or not they are read.
      operationId: getVideoTask
      parameters:
        - name: id
          in: path
          required: true
          description: Task ID returned when the task was created.
          schema:
            type: string
      responses:
        '200':
          description: Current task state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTask'
              example:
                id: 3f0c9a2e-6b1d-4c35-9a7e-2d8c5b1e4f60
                model: doubao-seedance-2-0-260128
                status: succeeded
                created_at: 1791994620
                updated_at: 1791994785
                content:
                  video_url: https://example.com/video.mp4
                duration: 5
                ratio: '16:9'
                resolution: 480p
                framespersecond: 24
                seed: 9846
                generate_audio: true
                usage:
                  completion_tokens: 50638
                  total_tokens: 50638
                cost_microusd: 1265950
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          description: 'not_found: no task with this ID for this user.'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error:
                  code: not_found
                request_id: 2f6c1d0e9a
components:
  schemas:
    VideoTask:
      type: object
      required:
        - id
        - model
        - status
        - created_at
        - updated_at
      properties:
        id:
          type: string
        model:
          type: string
        status:
          type: string
          enum:
            - queued
            - running
            - succeeded
            - failed
            - expired
            - cancelled
          description: succeeded is charged; failed, expired and cancelled are not.
        created_at:
          type: integer
          description: Unix seconds.
        updated_at:
          type: integer
          description: Unix seconds.
        content:
          type: object
          properties:
            video_url:
              type: string
              description: >-
                Signed MP4 link, valid for 48 hours after generation. Present
                when status is succeeded.
        duration:
          type: integer
        ratio:
          type: string
        resolution:
          type: string
        framespersecond:
          type: integer
        seed:
          type: integer
        generate_audio:
          type: boolean
        usage:
          type: object
          properties:
            completion_tokens:
              type: integer
              description: >-
                Output tokens generated: width x height x (24 x seconds + 1) /
                1024.
            total_tokens:
              type: integer
        error:
          type: object
          description: Why the task was not generated.
          properties:
            code:
              type: string
            message:
              type: string
        cost_microusd:
          type: integer
          description: >-
            Charge in micro-USD after your discount. Present once the task is
            settled.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - type
          properties:
            code:
              type: string
              example: model_unavailable
            message:
              type: string
              example: The model does not exist or is disabled.
              description: >-
                Short English description for logs and SDK exceptions. Its
                wording can change; branch on code.
            type:
              type: string
              example: not_found_error
              description: >-
                Error family by HTTP status: invalid_request_error,
                authentication_error, insufficient_quota, permission_error,
                not_found_error, conflict_error, rate_limit_error,
                service_unavailable or api_error.
            param:
              type: string
              maxLength: 200
              description: >-
                Rejected request field path when identifiable; never a parameter
                value. Responses uses native field names.
        request_id:
          type: string
          description: Present on chat completion, Responses and embeddings errors.
  responses:
    Unauthorized:
      description: '`unauthorized`: the API key is missing, revoked, or invalid.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: unauthorized
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        An API key created in the OmniRelay console. The owner can view it again
        in the console after confirming their identity.

````

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