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

# Retrieve a video generation task

> Retrieve the latest task state from the selected provider. A successful
terminal retrieval can finalize the wallet charge associated with the task.
Use the same API key that created the task; another key in the same workspace
cannot retrieve it.




## OpenAPI

````yaml /openapi/gengen-v1.yaml get /contents/generations/tasks/{id}
openapi: 3.1.0
info:
  title: GENGEN API
  version: 1.0.0
  description: |
    The public GENGEN v1 API. New integrations should use normalized camelCase
    request fields and read generated media from the standard `outputs` object.
servers:
  - url: https://gengen.farm/api/gengen/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Video generation tasks
    description: Create, inspect, list, and cancel asynchronous video generation tasks.
  - name: Text generation
    description: Create OpenAI-compatible chat completions, including streamed responses.
  - name: Image generation
    description: Generate images synchronously with normalized GENGEN request fields.
  - name: Video understanding
    description: Analyze video content through the BytePlus Responses API surface.
  - name: Files
    description: Authorize direct uploads for image, video, and audio inputs.
paths:
  /contents/generations/tasks/{id}:
    parameters:
      - $ref: '#/components/parameters/VideoTaskId'
    get:
      tags:
        - Video generation tasks
      summary: Retrieve a video generation task
      description: >
        Retrieve the latest task state from the selected provider. A successful

        terminal retrieval can finalize the wallet charge associated with the
        task.

        Use the same API key that created the task; another key in the same
        workspace

        cannot retrieve it.
      operationId: retrieveVideoGenerationTask
      responses:
        '200':
          description: The latest task state and outputs.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTask'
              example:
                id: seedance20:cgt-20260419-abcdef1234567890
                model: dreamina-seedance-2-0-260128
                status: succeeded
                outputs:
                  videos:
                    - https://example.com/generated-video.mp4
                  images: []
                createdAt: '2026-04-19T08:00:00.000Z'
                updatedAt: '2026-04-19T08:01:30.000Z'
                statusUpdateTime: '2026-04-19T08:01:30.000Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: The task is not accessible to the current API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error_code: seedance.task_not_found
                error: Seedance task was not found for this API key
        default:
          $ref: '#/components/responses/UnexpectedError'
components:
  parameters:
    VideoTaskId:
      name: id
      in: path
      required: true
      description: >
        The public task ID returned by the create endpoint. URL-encode the ID
        when

        placing it in the path, including any colon in the provider prefix.
      schema:
        type: string
      example: seedance20:cgt-20260419-abcdef1234567890
  schemas:
    VideoTask:
      type: object
      required:
        - id
        - model
        - status
        - outputs
      description: >
        Standard task fields are listed first. Additional provider-native and
        legacy

        aliases can be appended for compatibility.
      properties:
        id:
          type: string
          description: Public GENGEN task ID.
        model:
          type: string
          description: Public model ID selected for the task.
        status:
          type: string
          description: |
            Task state. Common values include `pending`, `queued`, `running`,
            `processing`, `succeeded`, `completed`, `failed`, `cancelled`, and
            `expired`.
        outputs:
          $ref: '#/components/schemas/GenerationOutputs'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        statusUpdateTime:
          type: string
          format: date-time
        failureReason:
          type: string
        created_at:
          $ref: '#/components/schemas/CompatibilityTimestamp'
        updated_at:
          $ref: '#/components/schemas/CompatibilityTimestamp'
        status_update_time:
          $ref: '#/components/schemas/CompatibilityTimestamp'
        failure_reason:
          type: string
        task_id:
          type: string
          description: Compatibility alias for `id`.
        video_url:
          type:
            - string
            - 'null'
          format: uri
          description: Compatibility alias for the first video output.
        videos:
          type: array
          items:
            type: string
            format: uri
          description: Compatibility alias for `outputs.videos`.
        enhanced_prompt:
          type: string
        detail: {}
        task_info: {}
        content: {}
        output: {}
        data: {}
        usage: {}
      additionalProperties: true
    Error:
      type: object
      required:
        - error_code
      properties:
        error_code:
          type: string
          description: Stable machine-readable error code.
        error_params:
          type: object
          description: Optional structured error context.
          additionalProperties: true
        error:
          type: string
          description: Optional human-readable message.
      additionalProperties: true
    GenerationOutputs:
      type: object
      required:
        - videos
        - images
      properties:
        videos:
          type: array
          items:
            type: string
            format: uri
        images:
          type: array
          items:
            type: string
            format: uri
      additionalProperties: true
    CompatibilityTimestamp:
      description: Compatibility timestamp returned by a provider or legacy endpoint.
      oneOf:
        - type: integer
          format: int64
        - type: string
  responses:
    BadRequest:
      description: The request body, path, or query parameters are invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error_code: gengen.model_required
            error_params:
              field: model
            error: A model is required
    Unauthorized:
      description: The bearer token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error_code: gengen.auth_required
            error: Missing Authorization bearer token
    Forbidden:
      description: The API key is revoked, expired, or not authorized for the operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error_code: gengen.api_key_revoked
            error: GENGEN API key has been revoked
    UnexpectedError:
      description: GENGEN or an upstream provider could not complete the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: GENGEN API key
      description: A workspace API key beginning with `gengen_live_`.

````