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

# wan2.7-i2v

> Supported combinations are first_frame; first_frame with driving_audio; first_frame with last_frame; first_frame with last_frame and driving_audio; first_clip; or first_clip with last_frame. Each media type can appear once.



## OpenAPI

````yaml api-reference/model-api/alibaba/openapi/wan2.7-i2v/openapi.yaml POST /v1/video/generations
openapi: 3.1.0
info:
  title: Wan2.7 I2V
  description: >-
    Generate video from frames, driving audio, or an initial clip through the
    AnyFast asynchronous video API.
  version: 1.0.0
servers:
  - url: https://www.anyfast.ai
security:
  - bearerAuth: []
paths:
  /v1/video/generations:
    post:
      summary: Create a Wan2.7 image-to-video task
      description: >-
        Supported combinations are first_frame; first_frame with driving_audio;
        first_frame with last_frame; first_frame with last_frame and
        driving_audio; first_clip; or first_clip with last_frame. Each media
        type can appear once.
      operationId: createWan27I2v
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - input
              properties:
                model:
                  type: string
                  enum:
                    - wan2.7-i2v
                input:
                  type: object
                  required:
                    - media
                  properties:
                    prompt:
                      type: string
                      maxLength: 5000
                      description: Motion and scene description.
                    negative_prompt:
                      type: string
                      maxLength: 500
                    media:
                      type: array
                      minItems: 1
                      maxItems: 3
                      items:
                        $ref: '#/components/schemas/Media'
                parameters:
                  $ref: '#/components/schemas/GenerationParameters'
              example:
                model: wan2.7-i2v
                input:
                  prompt: The camera moves closer as the lanterns begin to glow.
                  media:
                    - type: first_frame
                      url: https://example.com/first-frame.png
                parameters:
                  resolution: 720P
                  duration: 5
                  prompt_extend: true
                  watermark: false
      responses:
        '200':
          description: Task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TaskCreated'
        '400':
          description: Invalid request or unsupported media combination
        '401':
          description: Unauthorized
        '429':
          description: Rate limit exceeded
components:
  schemas:
    Media:
      type: object
      required:
        - type
        - url
      properties:
        type:
          type: string
          enum:
            - first_frame
            - last_frame
            - driving_audio
            - first_clip
        url:
          type: string
          description: >-
            Public media URL. first_frame and last_frame also accept Base64 data
            URLs.
    GenerationParameters:
      type: object
      properties:
        resolution:
          type: string
          enum:
            - 720P
            - 1080P
          default: 1080P
        duration:
          type: integer
          minimum: 2
          maximum: 15
          default: 5
          description: >-
            Final output duration. For continuation, this includes the input
            clip.
        prompt_extend:
          type: boolean
          default: true
          description: >-
            Whether to rewrite and enrich the prompt. To enable NSFW generation,
            use a token from the Special-Ns resource group and set this
            parameter to false.
        watermark:
          type: boolean
          default: false
        seed:
          type: integer
          minimum: 0
          maximum: 2147483647
    TaskCreated:
      type: object
      properties:
        id:
          type: string
          example: asyntask_example123
        task_id:
          type: string
          example: asyntask_example123
        object:
          type: string
          example: video
        model:
          type: string
          example: wan2.7-i2v
        status:
          type: string
          example: queued
        progress:
          type: integer
          example: 0
        created_at:
          type: integer
          example: 1784520000
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````