> ## 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 Wan video task

> Create a Wan 2.7 image-to-video or Wan Animate motion-transfer task.



## OpenAPI

````yaml openapi/wan-video.yaml POST /contents/generations/tasks
openapi: 3.1.0
info:
  title: Wan video API
  version: 1.0.0
  description: Provider-specific GENGEN reference for Wan video generation.
servers:
  - url: https://gengen.farm/api/gengen/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /contents/generations/tasks:
    post:
      summary: Create a Wan video task
      description: >
        Create an asynchronous Wan video task through the shared GENGEN
        endpoint.

        Select the Wan 2.7 or Wan Animate request variant so the reference and

        Playground display only the parameters supported by that model.


        [Try Wan 2.7 in the API
        Explorer](https://gengen.farm/api-explorer/demos/video-generation?model=wan2.7-i2v-spicy)

        or [try Wan
        Animate](https://gengen.farm/api-explorer/demos/video-generation?model=wan-animate).
      operationId: createWanVideoTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWanVideoTaskRequest'
            examples:
              wan27:
                summary: Wan 2.7 image to video
                value:
                  model: wan2.7-i2v-spicy
                  mode: image_to_video
                  prompt: >-
                    A premium watch rotates slowly on black marble with
                    cinematic rim lighting.
                  assets:
                    firstFrameImage: https://example.com/watch-reference.jpg
                    referenceAudio: https://example.com/voiceover.mp3
                  controls:
                    resolution: 720p
                    duration: 8
                    generateAudio: false
                    negativePrompt: blurry, distorted details
                    promptExtend: true
                    seed: 42
              wanAnimate:
                summary: Wan Animate motion transfer
                value:
                  model: wan-animate
                  mode: image_video_to_video
                  prompt: >-
                    Preserve the character identity and transfer the full dance
                    performance.
                  assets:
                    sourceImage: https://example.com/character.jpg
                    referenceVideo: https://example.com/dance-reference.mp4
                  controls:
                    resolution: 720p
                    seed: 42
      responses:
        '200':
          description: The task was accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTask'
              example:
                id: wan27:task_123
                model: wan2.7-i2v-spicy
                status: pending
                outputs:
                  videos: []
                  images: []
                createdAt: '2026-06-17T08:00:00.000Z'
                updatedAt: '2026-06-17T08:00:00.000Z'
                statusUpdateTime: '2026-06-17T08:00:00.000Z'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/PaymentRequired'
        '403':
          $ref: '#/components/responses/Forbidden'
        default:
          $ref: '#/components/responses/UnexpectedError'
      x-codeSamples:
        - lang: bash
          label: Wan 2.7
          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": "wan2.7-i2v-spicy",
                "mode": "image_to_video",
                "prompt": "A premium watch rotates slowly on black marble with cinematic rim lighting.",
                "assets": {
                  "firstFrameImage": "https://example.com/watch-reference.jpg",
                  "referenceAudio": "https://example.com/voiceover.mp3"
                },
                "controls": {
                  "resolution": "720p",
                  "duration": 8,
                  "generateAudio": false,
                  "negativePrompt": "blurry, distorted details",
                  "promptExtend": true,
                  "seed": 42
                }
              }'
        - lang: bash
          label: Wan Animate
          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": "wan-animate",
                "mode": "image_video_to_video",
                "prompt": "Preserve the character identity and transfer the full dance performance.",
                "assets": {
                  "sourceImage": "https://example.com/character.jpg",
                  "referenceVideo": "https://example.com/dance-reference.mp4"
                },
                "controls": {
                  "resolution": "720p",
                  "seed": 42
                }
              }'
components:
  schemas:
    CreateWanVideoTaskRequest:
      oneOf:
        - $ref: '#/components/schemas/CreateWan27VideoTaskRequest'
        - $ref: '#/components/schemas/CreateWanAnimateVideoTaskRequest'
      discriminator:
        propertyName: model
        mapping:
          wan2.7-i2v-spicy:
            $ref: '#/components/schemas/CreateWan27VideoTaskRequest'
          wan-animate:
            $ref: '#/components/schemas/CreateWanAnimateVideoTaskRequest'
    VideoTask:
      type: object
      required:
        - id
        - model
        - status
        - outputs
      properties:
        id:
          type: string
        model:
          type: string
        status:
          type: string
        outputs:
          $ref: '#/components/schemas/GenerationOutputs'
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
        statusUpdateTime:
          type: string
          format: date-time
      additionalProperties: true
    CreateWan27VideoTaskRequest:
      title: Wan 2.7 image to video
      type: object
      required:
        - model
        - prompt
        - assets
      properties:
        model:
          type: string
          const: wan2.7-i2v-spicy
        mode:
          type: string
          const: image_to_video
          default: image_to_video
        prompt:
          type: string
          minLength: 1
        assets:
          $ref: '#/components/schemas/Wan27Assets'
        controls:
          $ref: '#/components/schemas/Wan27Controls'
      additionalProperties: false
    CreateWanAnimateVideoTaskRequest:
      title: Wan Animate motion transfer
      type: object
      required:
        - model
        - assets
      properties:
        model:
          type: string
          const: wan-animate
        mode:
          type: string
          const: image_video_to_video
          default: image_video_to_video
        prompt:
          type: string
          description: Optional guidance for the performance and visual result.
        assets:
          $ref: '#/components/schemas/WanAnimateAssets'
        controls:
          $ref: '#/components/schemas/WanAnimateControls'
      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
    Error:
      type: object
      properties:
        error_code:
          type: string
        error:
          type: string
        error_params:
          type: object
          additionalProperties: true
      additionalProperties: true
    Wan27Assets:
      type: object
      required:
        - firstFrameImage
      properties:
        firstFrameImage:
          type: string
          description: >
            Source image as an HTTPS URL, image data URL, or Base64 image
            string.

            `asset://` references are not supported.
        referenceAudio:
          type: string
          format: uri
          description: Optional public HTTPS audio URL.
      additionalProperties: false
    Wan27Controls:
      type: object
      properties:
        resolution:
          type: string
          default: 1080p
          description: |
            Supported values:

            - `720p` — HD output
            - `1080p` — Full HD output
          enum:
            - 720p
            - 1080p
        duration:
          type: integer
          minimum: 2
          maximum: 15
          default: 5
        generateAudio:
          type: boolean
          default: true
        negativePrompt:
          type: string
        promptExtend:
          type: boolean
          default: true
        seed:
          description: Omit or pass `null` for provider-selected randomness.
          oneOf:
            - type: integer
              minimum: 0
              maximum: 2147483647
            - type: 'null'
      additionalProperties: false
    WanAnimateAssets:
      type: object
      required:
        - sourceImage
        - referenceVideo
      properties:
        sourceImage:
          type: string
          description: >
            Subject image as an HTTPS URL, image data URL, or Base64 image
            string,

            up to 50 MB. `asset://` references are not supported.
        referenceVideo:
          type: string
          format: uri
          description: Public HTTPS motion-reference video URL, up to 200 MB.
      additionalProperties: false
    WanAnimateControls:
      type: object
      properties:
        resolution:
          type: string
          default: 720p
          description: |
            Supported values:

            - `480p` — standard-definition output
            - `720p` — HD output
          enum:
            - 480p
            - 720p
        seed:
          description: Omit or pass `null` for provider-selected randomness.
          oneOf:
            - type: integer
              minimum: 0
              maximum: 2147483647
            - type: 'null'
      additionalProperties: false
  responses:
    BadRequest:
      description: The Wan request is invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: The bearer token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    PaymentRequired:
      description: The workspace does not have enough available balance.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: The API key is not authorized for this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnexpectedError:
      description: GENGEN or Wan 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_`.

````