> ## 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.

# Create a video generation task

> Submit an asynchronous BytePlus Seedance video generation task. This
reference intentionally documents only the BytePlus models and parameters,
even though other providers use the same public GENGEN endpoint.




## OpenAPI

````yaml /openapi/gengen-v1.yaml post /contents/generations/tasks
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:
    post:
      tags:
        - Video generation tasks
      summary: Create a video generation task
      description: >
        Submit an asynchronous BytePlus Seedance video generation task. This

        reference intentionally documents only the BytePlus models and
        parameters,

        even though other providers use the same public GENGEN endpoint.
      operationId: createVideoGenerationTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBytePlusVideoTaskRequest'
            examples:
              textToVideo:
                summary: Text to video
                value:
                  model: dreamina-seedance-2-0-260128
                  mode: text_to_video
                  prompt: A kitten yawns at the camera in warm morning light.
                  contentPreFilter: true
                  controls:
                    duration: 5
                    resolution: 720p
                    ratio: '16:9'
                    generateAudio: true
                    watermark: false
              firstFrame:
                summary: First-frame image to video
                value:
                  model: dreamina-seedance-2-0-260128
                  mode: image_first_frame
                  prompt: The product slowly rotates on a clean studio turntable.
                  assets:
                    firstFrameImage: https://example.com/product.jpg
                  controls:
                    duration: 5
                    resolution: 720p
                    ratio: adaptive
                    generateAudio: false
      responses:
        '200':
          description: >-
            The task was accepted or completed synchronously by the selected
            provider.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTask'
              example:
                id: seedance20:cgt-20260419-abcdef1234567890
                model: dreamina-seedance-2-0-260128
                status: pending
                outputs:
                  videos: []
                  images: []
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          description: The workspace does not have enough available balance.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                error_code: seedance.insufficient_balance
                error: Insufficient available balance
        '403':
          $ref: '#/components/responses/Forbidden'
        default:
          $ref: '#/components/responses/UnexpectedError'
      x-codeSamples:
        - lang: bash
          label: Text to video
          source: |
            curl --request POST \
              --url https://gengen.farm/api/gengen/v1/contents/generations/tasks \
              --header 'Authorization: Bearer gengen_live_xxxxxxxxxxxxxxxx' \
              --header 'Content-Type: application/json' \
              --data '{
                "model": "dreamina-seedance-2-0-260128",
                "mode": "text_to_video",
                "prompt": "A kitten yawns at the camera in warm morning light.",
                "contentPreFilter": true,
                "controls": {
                  "duration": 5,
                  "resolution": "720p",
                  "ratio": "16:9",
                  "generateAudio": true,
                  "watermark": false
                }
              }'
components:
  schemas:
    CreateBytePlusVideoTaskRequest:
      type: object
      required:
        - model
      description: >
        Normalized GENGEN request for BytePlus Seedance video models. Other
        upstream

        providers share this endpoint but have separate reference pages and
        request

        parameter sets.
      properties:
        model:
          type: string
          description: |
            Supported BytePlus Seedance model IDs:

            - `dreamina-seedance-2-0-260128` — Seedance 2.0
            - `dreamina-seedance-2-0-fast-260128` — Seedance 2.0 Fast
            - `dreamina-seedance-2-0-mini-260615` — Seedance 2.0 Mini
            - `seedance-1-5-pro-251215` — Seedance 1.5 Pro
          enum:
            - dreamina-seedance-2-0-260128
            - dreamina-seedance-2-0-fast-260128
            - dreamina-seedance-2-0-mini-260615
            - seedance-1-5-pro-251215
          example: dreamina-seedance-2-0-260128
        mode:
          type: string
          description: >
            Generation mode. If omitted, GENGEN attempts to infer the mode from

            the supplied assets. Seedance 2.0, 2.0 Fast, and 2.0 Mini support
            all

            six values. Seedance 1.5 Pro supports only `text_to_video`,

            `image_first_frame`, and `image_first_last_frame`.


            Supported values:


            - `text_to_video` — generate from a text prompt

            - `image_first_frame` — animate a first-frame image

            - `image_first_last_frame` — interpolate between first and last
            frames

            - `multimodal_reference` — guide generation with image, video, or
            audio references

            - `video_modify` — edit an existing source video

            - `video_extend` — extend an existing source video
          enum:
            - text_to_video
            - image_first_frame
            - image_first_last_frame
            - multimodal_reference
            - video_modify
            - video_extend
        prompt:
          type: string
          description: >
            Creative text instruction. Required for `text_to_video` and
            recommended

            for every other BytePlus Seedance mode.
        contentPreFilter:
          type: boolean
          default: true
          description: Apply content pre-filtering before submitting the task.
        assets:
          $ref: '#/components/schemas/BytePlusVideoAssets'
        controls:
          $ref: '#/components/schemas/BytePlusVideoControls'
      additionalProperties: false
    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
    BytePlusVideoAssets:
      type: object
      description: Image, video, and audio inputs supported by BytePlus Seedance.
      properties:
        firstFrameImage:
          $ref: '#/components/schemas/AssetReference'
        lastFrameImage:
          $ref: '#/components/schemas/AssetReference'
        referenceImages:
          type: array
          maxItems: 9
          items:
            $ref: '#/components/schemas/AssetReference'
        referenceVideos:
          type: array
          maxItems: 3
          items:
            $ref: '#/components/schemas/AssetReference'
        referenceAudio:
          $ref: '#/components/schemas/AssetReference'
        sourceVideo:
          $ref: '#/components/schemas/AssetReference'
      additionalProperties: false
    BytePlusVideoControls:
      type: object
      description: Output and task controls supported by BytePlus Seedance.
      properties:
        duration:
          type: integer
          description: |
            Output duration in seconds. Use `-1` for model-selected duration.
            Seedance 2.0, 2.0 Fast, and 2.0 Mini accept 4–15; Seedance 1.5 Pro
            accepts 4–12.
          default: 5
          example: 5
        resolution:
          type: string
          default: 720p
          description: >
            Seedance 2.0 supports all listed values. Seedance 2.0 Fast and Mini

            support only `480p` and `720p`; Seedance 1.5 Pro does not support
            `4k`.


            Supported values:


            - `480p` — standard-definition output

            - `720p` — HD output

            - `1080p` — Full HD output

            - `4k` — Ultra HD output
          enum:
            - 480p
            - 720p
            - 1080p
            - 4k
        ratio:
          type: string
          default: adaptive
          description: |
            Supported values:

            - `adaptive` — automatically select the output aspect ratio
            - `1:1` — square video
            - `4:3` / `3:4` — landscape or portrait standard format
            - `16:9` / `9:16` — landscape or portrait widescreen format
            - `21:9` — ultrawide video
          enum:
            - '21:9'
            - '16:9'
            - '4:3'
            - '1:1'
            - '3:4'
            - '9:16'
            - adaptive
        generateAudio:
          type: boolean
          default: true
        watermark:
          type: boolean
          default: false
        returnLastFrame:
          type: boolean
          default: false
        seed:
          type: integer
          minimum: -1
          maximum: 4294967295
          default: -1
          description: Use `-1` or omit the field for provider-selected randomness.
        cameraFixed:
          type: boolean
          default: false
          description: Seedance 1.5 Pro text-to-video only.
        serviceTier:
          type: string
          default: default
          description: |
            Seedance 1.5 Pro only. Seedance 2.0 models do not support `flex`.

            Supported values:

            - `default` — standard online processing
            - `flex` — flexible offline processing
          enum:
            - default
            - flex
        callbackUrl:
          type: string
          format: uri
        executionExpiresAfter:
          type: integer
          minimum: 3600
          maximum: 259200
          description: Task expiration threshold in seconds from creation time.
        safetyIdentifier:
          type: string
          maxLength: 64
          pattern: ^[\u0000-\u007F]*$
          description: Stable per-user opaque identifier containing ASCII characters only.
      additionalProperties: false
    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
    AssetReference:
      type: string
      description: An HTTPS URL, supported data URL, or owned `asset://` reference.
      example: https://example.com/reference.jpg
  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_`.

````