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

# Wan V2.7 Video

Wan 2.7 unified text/image/reference-to-video plus edit-video workflows.


## OpenAPI

````yaml /openapi.json post /generation/wan/wan-v2.7-video
openapi: 3.1.0
info:
  title: skills.video OpenAPI
  version: 1.0.0
  description: OpenAPI schema for skills.video API endpoints.
servers:
  - url: https://open.skills.video/api/v1
security: []
paths:
  /generation/wan/wan-v2.7-video:
    post:
      summary: Wan V2.7 Video
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/wan_wan_v2_7_videoCreateRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/wan_wan_v2_7_videoMultipartCreateRequest'
      responses:
        '200':
          description: Generation submission accepted
          content:
            application/json:
              example:
                id: gen_123
                status: IN_QUEUE
                input:
                  prompt: a cat walking through neon rain
                  duration: 5
                  aspect_ratio: '16:9'
                  'n': 1
                usage:
                  total: 20
                  subscription: 20
                  permanent: 0
              schema:
                $ref: '#/components/schemas/wan_wan_v2_7_videoPrediction'
        '400':
          description: >-
            Video generation request was rejected as invalid or model is not
            supported.
          content:
            application/json:
              example:
                error: VIDEO_GENERATION_INVALID_INPUT
                code: VIDEO_GENERATION_INVALID_INPUT
                message: '''prompt'' parameter is required'
              schema:
                anyOf:
                  - $ref: '#/components/schemas/VideoGenerationErrorResponse'
                  - $ref: '#/components/schemas/TemplateErrorResponse'
                  - $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required or failed
          content:
            application/json:
              example:
                error: UNAUTHORIZED
                code: UNAUTHORIZED
                message: Unauthorized
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '402':
          description: Workspace does not have enough credits to run this generation.
          content:
            application/json:
              example:
                error: INSUFFICIENT_CREDITS
                code: VIDEO_GENERATION_INSUFFICIENT_CREDITS
                message: Insufficient credits for this generation.
              schema:
                $ref: '#/components/schemas/VideoGenerationErrorResponse'
        '403':
          description: Workspace access is forbidden or Seedance verification is required.
          content:
            application/json:
              example:
                error: WORKSPACE_FORBIDDEN
                code: WORKSPACE_FORBIDDEN
                message: You do not have access to this workspace.
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - $ref: '#/components/schemas/SeedanceVerificationErrorResponse'
        '404':
          description: Resource, model, or template not found.
          content:
            application/json:
              example:
                error: TEMPLATE_NOT_FOUND
                code: TEMPLATE_NOT_FOUND
                message: Template not found.
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ErrorResponse'
                  - $ref: '#/components/schemas/TemplateErrorResponse'
        '422':
          description: Upstream moderation rejected the request content.
          content:
            application/json:
              example:
                error: VIDEO_GENERATION_CONTENT_REJECTED
                code: VIDEO_GENERATION_CONTENT_REJECTED
                message: Request content was rejected by the moderation policy.
              schema:
                $ref: '#/components/schemas/VideoGenerationErrorResponse'
        '429':
          description: Generation rate limit exceeded upstream.
          content:
            application/json:
              example:
                error: VIDEO_GENERATION_RATE_LIMITED
                code: VIDEO_GENERATION_RATE_LIMITED
                message: Rate limit exceeded. Please retry later.
              schema:
                $ref: '#/components/schemas/VideoGenerationErrorResponse'
        '500':
          description: >-
            Video generation failed before provider execution completed.
            Response includes code and message fields.
          content:
            application/json:
              example:
                error: VIDEO_GENERATION_FAILED
                code: VIDEO_GENERATION_FAILED
                message: Generation failed.
              schema:
                anyOf:
                  - $ref: '#/components/schemas/VideoGenerationErrorResponse'
                  - $ref: '#/components/schemas/ErrorResponse'
        '502':
          description: >-
            Video generation failed. Returned when the upstream provider reports
            a generic failure.
          content:
            application/json:
              example:
                error: VIDEO_GENERATION_FAILED
                code: VIDEO_GENERATION_FAILED
                message: Generation failed.
              schema:
                $ref: '#/components/schemas/VideoGenerationErrorResponse'
        '503':
          description: Upstream generation provider is unavailable.
          content:
            application/json:
              example:
                error: VIDEO_GENERATION_PROVIDER_UNAVAILABLE
                code: VIDEO_GENERATION_PROVIDER_UNAVAILABLE
                message: Upstream generation provider is temporarily unavailable.
              schema:
                $ref: '#/components/schemas/VideoGenerationErrorResponse'
        '504':
          description: Video generation exceeded the upstream timeout.
          content:
            application/json:
              example:
                error: VIDEO_GENERATION_TIMEOUT
                code: VIDEO_GENERATION_TIMEOUT
                message: Generation timed out.
              schema:
                $ref: '#/components/schemas/VideoGenerationErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    wan_wan_v2_7_videoCreateRequest:
      $ref: '#/components/schemas/wan_wan_v2_7_videoInput'
      title: Input
      xMeta:
        video_duration: video_url
        size: video_url
    wan_wan_v2_7_videoMultipartCreateRequest:
      title: Input
      xMeta:
        video_duration: video_url
        size: video_url
      allOf:
        - title: Input
          xMeta:
            video_duration: video_url
            size: video_url
          type: object
          properties:
            feature:
              description: >-
                Workflow type: text/image-to-video, reference-to-video,
                frames-to-video, or edit-video.
              title: Feature
              order: 0
              default: text-image
              type: string
              enum:
                - text-image
                - reference
                - frames
                - edit-video
            prompt:
              description: >-
                Prompt text. Required for reference and edit-video modes,
                optional for text/image and frames modes.
              title: Prompt
              order: 1
              anyOf:
                - type: string
                  minLength: 1
                - type: 'null'
            image_url:
              description: >-
                Starting image URL for image or frames workflows. When using
                application/json, send a public URL. When using
                multipart/form-data, send either a public URL or a binary file
                upload.
              title: Image
              order: 3
              xUiContract:
                type: mutex
                mutexRule: wan_v27_video_input_mode
                branch: image
                activeWhen: nonEmpty
                interaction: disable
              x-cli-aliases:
                - image
              anyOf:
                - anyOf:
                    - format: uri
                      type: string
                    - format: binary
                      type: string
                - type: 'null'
            end_image_url:
              description: >-
                Optional ending image URL. Requires image_url and is primarily
                used for frames workflow. When using application/json, send a
                public URL. When using multipart/form-data, send either a public
                URL or a binary file upload.
              title: End Image
              order: 4
              xUiContract:
                type: mutex
                mutexRule: wan_v27_video_input_mode
                branch: image
                activeWhen: nonEmpty
                interaction: disable
              x-cli-aliases:
                - end-image
              anyOf:
                - anyOf:
                    - format: uri
                      type: string
                    - format: binary
                      type: string
                - type: 'null'
            video_url:
              description: >-
                Optional continuation video URL for image workflow, or required
                input video URL for edit-video workflow. When using
                application/json, send a public URL. When using
                multipart/form-data, send either a public URL or a binary file
                upload.
              title: Video
              order: 5
              xUiContract:
                type: mutex
                mutexRule: wan_v27_video_input_mode
                branch: video
                activeWhen: nonEmpty
                interaction: disable
              x-cli-aliases:
                - video
              anyOf:
                - anyOf:
                    - format: uri
                      type: string
                    - format: binary
                      type: string
                - type: 'null'
            reference_image_urls:
              description: >-
                Reference image URLs for reference workflow. In edit-video
                workflow, only the first image is used.
              title: Reference Images
              order: 6
              xUiContract:
                type: mutex
                mutexRule: wan_v27_video_input_mode
                branch: reference
                activeWhen: nonEmpty
                interaction: disable
              x-cli-aliases:
                - reference-image
                - reference-images
              maxItems: 8
              type: array
              items:
                description: >-
                  When using application/json, send a public URL. When using
                  multipart/form-data, send either a public URL or a binary file
                  upload.
                anyOf:
                  - format: uri
                    type: string
                  - format: binary
                    type: string
            reference_image_url:
              description: >-
                Single reference image URL alias for edit-video workflow. When
                using application/json, send a public URL. When using
                multipart/form-data, send either a public URL or a binary file
                upload.
              title: Reference Image
              order: 6
              x-cli-aliases:
                - reference-image
              anyOf:
                - anyOf:
                    - format: uri
                      type: string
                    - format: binary
                      type: string
                - type: 'null'
            video_refs:
              description: Reference video URLs for reference workflow.
              title: Reference Videos
              order: 7
              xUiContract:
                type: mutex
                mutexRule: wan_v27_video_input_mode
                branch: reference
                activeWhen: nonEmpty
                interaction: disable
              maxItems: 8
              type: array
              items:
                description: >-
                  When using application/json, send a public URL. When using
                  multipart/form-data, send either a public URL or a binary file
                  upload.
                anyOf:
                  - format: uri
                    type: string
                  - format: binary
                    type: string
            audio_url:
              description: >-
                Optional driving audio URL. Used in text/image and frames
                workflows. When using application/json, send a public URL. When
                using multipart/form-data, send either a public URL or a binary
                file upload.
              title: Audio
              order: 8
              x-cli-aliases:
                - audio
              anyOf:
                - anyOf:
                    - format: uri
                      type: string
                    - format: binary
                      type: string
                - type: 'null'
            aspect_ratio:
              description: Output aspect ratio.
              title: Aspect Ratio
              order: 9
              default: '16:9'
              type: string
              enum:
                - '16:9'
                - '9:16'
                - '1:1'
                - '4:3'
                - '3:4'
            resolution:
              description: Output video resolution tier.
              title: Resolution
              order: 10
              default: 1080p
              type: string
              enum:
                - 720p
                - 1080p
            duration:
              description: Output video duration in seconds.
              title: Duration
              order: 11
              default: 5
              anyOf:
                - type: number
                  const: 2
                - type: number
                  const: 3
                - type: number
                  const: 4
                - type: number
                  const: 5
                - type: number
                  const: 6
                - type: number
                  const: 7
                - type: number
                  const: 8
                - type: number
                  const: 9
                - type: number
                  const: 10
                - type: number
                  const: 11
                - type: number
                  const: 12
                - type: number
                  const: 13
                - type: number
                  const: 14
                - type: number
                  const: 15
            negative_prompt:
              description: Content to avoid in the generated video.
              title: Negative Prompt
              order: 12
              anyOf:
                - type: string
                - type: 'null'
            enable_prompt_expansion:
              description: Enable intelligent prompt rewriting.
              title: Enable Prompt Expansion
              order: 13
              default: true
              type: boolean
            multi_shots:
              description: >-
                Enable intelligent multi-shot segmentation. Used in reference
                workflow.
              title: Multi Shots
              order: 14
              default: false
              type: boolean
            audio_setting:
              description: Audio handling in edit-video mode.
              title: Audio Setting
              order: 15
              default: auto
              type: string
              enum:
                - auto
                - origin
            seed:
              description: Random seed for reproducibility.
              title: Seed
              order: 16
              anyOf:
                - type: integer
                  minimum: 0
                  maximum: 2147483647
                - type: 'null'
          additionalProperties: {}
        - anyOf:
            - type: object
              properties:
                feature:
                  type: string
                  enum:
                    - text-image
                duration: {}
                negative_prompt: {}
                enable_prompt_expansion: {}
                audio_url:
                  x-cli-aliases:
                    - audio
              additionalProperties: {}
            - type: object
              properties:
                feature:
                  type: string
                  enum:
                    - frames
                duration: {}
                negative_prompt: {}
                enable_prompt_expansion: {}
                audio_url:
                  x-cli-aliases:
                    - audio
                image_url:
                  x-cli-aliases:
                    - image
              required:
                - image_url
              additionalProperties: {}
            - allOf:
                - type: object
                  properties:
                    feature:
                      type: string
                      enum:
                        - reference
                    duration:
                      anyOf:
                        - type: number
                          const: 2
                        - type: number
                          const: 3
                        - type: number
                          const: 4
                        - type: number
                          const: 5
                        - type: number
                          const: 6
                        - type: number
                          const: 7
                        - type: number
                          const: 8
                        - type: number
                          const: 9
                        - type: number
                          const: 10
                    negative_prompt: {}
                    enable_prompt_expansion: {}
                    multi_shots: {}
                    prompt: {}
                  required:
                    - prompt
                  additionalProperties: {}
                - anyOf:
                    - type: object
                      properties:
                        reference_image_urls:
                          x-cli-aliases:
                            - reference-image
                            - reference-images
                      required:
                        - reference_image_urls
                      additionalProperties: {}
                    - type: object
                      properties:
                        video_refs: {}
                      required:
                        - video_refs
                      additionalProperties: {}
            - type: object
              properties:
                feature:
                  type: string
                  enum:
                    - edit-video
                reference_image_url:
                  description: >-
                    When using application/json, send a public URL. When using
                    multipart/form-data, send either a public URL or a binary
                    file upload.
                  x-cli-aliases:
                    - reference-image
                  anyOf:
                    - anyOf:
                        - format: uri
                          type: string
                        - format: binary
                          type: string
                    - type: 'null'
                audio_setting:
                  type: string
                  enum:
                    - auto
                    - origin
                duration:
                  default: 0
                  anyOf:
                    - type: number
                      const: 0
                    - type: number
                      const: 2
                    - type: number
                      const: 3
                    - type: number
                      const: 4
                    - type: number
                      const: 5
                    - type: number
                      const: 6
                    - type: number
                      const: 7
                    - type: number
                      const: 8
                    - type: number
                      const: 9
                    - type: number
                      const: 10
                prompt: {}
                video_url:
                  x-cli-aliases:
                    - video
              required:
                - prompt
                - video_url
              additionalProperties: {}
    wan_wan_v2_7_videoPrediction:
      type: object
      properties:
        id:
          description: Generation id.
          type: string
        status:
          $ref: '#/components/schemas/QueueState'
        input:
          $ref: '#/components/schemas/wan_wan_v2_7_videoInputOutput'
          title: Input
          xMeta:
            video_duration: video_url
            size: video_url
          description: Normalized input payload for the generation task.
        usage:
          $ref: '#/components/schemas/Usage'
        code:
          $ref: '#/components/schemas/__schema1'
        message:
          $ref: '#/components/schemas/__schema2'
      required:
        - id
        - status
        - input
        - usage
      additionalProperties: false
    VideoGenerationErrorResponse:
      type: object
      properties:
        error:
          description: >-
            Legacy machine-readable error field. Prefer `code` for new
            integrations.
          type: string
        code:
          description: >-
            Video generation error code. `*_FAILED` is the generic fallback;
            more specific codes (`*_TIMEOUT`, `*_RATE_LIMITED`,
            `*_PROVIDER_UNAVAILABLE`, `*_UNSUPPORTED_MODEL`, `*_INVALID_INPUT`,
            `*_INSUFFICIENT_CREDITS`, `*_CONTENT_REJECTED`) are surfaced when
            applicable.
          type: string
          enum:
            - VIDEO_GENERATION_FAILED
            - VIDEO_GENERATION_TIMEOUT
            - VIDEO_GENERATION_RATE_LIMITED
            - VIDEO_GENERATION_PROVIDER_UNAVAILABLE
            - VIDEO_GENERATION_UNSUPPORTED_MODEL
            - VIDEO_GENERATION_INVALID_INPUT
            - VIDEO_GENERATION_INSUFFICIENT_CREDITS
            - VIDEO_GENERATION_CONTENT_REJECTED
        message:
          description: Human readable error message. Upstream vendor names are redacted.
          type: string
        errors:
          description: Field-level validation errors when available.
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
              code:
                type: string
            required:
              - path
              - message
              - code
            additionalProperties: false
        details:
          description: Additional structured error details when available.
        requested:
          description: Requested credits when the error is insufficient credits.
          type: number
        available:
          description: Available credits when the error is insufficient credits.
          type: number
      required:
        - code
        - message
      additionalProperties: false
    TemplateErrorResponse:
      type: object
      properties:
        error:
          description: >-
            Legacy machine-readable error field. Prefer `code` for new
            integrations.
          type: string
        code:
          description: Template error code.
          type: string
          enum:
            - TEMPLATE_NOT_FOUND
            - TEMPLATE_MODEL_MISMATCH
            - TEMPLATE_INVALID_INPUT
            - TEMPLATE_TRANSFORM_FAILED
        message:
          description: Human readable template error message.
          type: string
        errors:
          description: Field-level template validation errors when available.
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
              code:
                type: string
            required:
              - path
              - message
              - code
            additionalProperties: false
        details:
          description: Additional structured error details when available.
      required:
        - code
        - message
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          description: >-
            Legacy machine-readable error field. Prefer `code` for new
            integrations. This may contain an unprefixed compatibility code for
            older clients.
          type: string
        code:
          description: Machine-readable error code. Use this to branch in client code.
          type: string
        message:
          description: Human readable error message.
          type: string
        errors:
          description: Field-level validation errors when available.
          type: array
          items:
            type: object
            properties:
              path:
                type: string
              message:
                type: string
              code:
                type: string
            required:
              - path
              - message
              - code
            additionalProperties: false
        details:
          description: Additional structured error details when available.
      required:
        - code
        - message
      additionalProperties: false
    SeedanceVerificationErrorResponse:
      type: object
      properties:
        error:
          description: >-
            Legacy machine-readable error field. Prefer `code` for new
            integrations.
          type: string
        code:
          description: Seedance verification error code.
          type: string
          const: SEEDANCE_VERIFICATION_REQUIRED
        message:
          description: Human readable verification error message.
          type: string
        verification:
          description: Current Seedance verification state when available.
          anyOf:
            - {}
            - type: 'null'
      required:
        - code
        - message
      additionalProperties: false
    wan_wan_v2_7_videoInput:
      title: Input
      oneOf:
        - title: Text/Image
          allOf:
            - title: Input
              xMeta:
                video_duration: video_url
                size: video_url
              type: object
              properties:
                feature:
                  description: >-
                    Workflow type: text/image-to-video, reference-to-video,
                    frames-to-video, or edit-video.
                  title: Feature
                  order: 0
                  type: string
                  const: text-image
                prompt:
                  description: >-
                    Prompt text. Required for reference and edit-video modes,
                    optional for text/image and frames modes.
                  title: Prompt
                  order: 1
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                image_url:
                  description: Starting image URL for image or frames workflows.
                  title: Image
                  format: uri
                  order: 3
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                end_image_url:
                  description: >-
                    Optional ending image URL. Requires image_url and is
                    primarily used for frames workflow.
                  title: End Image
                  format: uri
                  order: 4
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_url:
                  description: >-
                    Optional continuation video URL for image workflow, or
                    required input video URL for edit-video workflow.
                  title: Video
                  format: uri
                  order: 5
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: video
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                reference_image_urls:
                  description: >-
                    Reference image URLs for reference workflow. In edit-video
                    workflow, only the first image is used.
                  title: Reference Images
                  order: 6
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                reference_image_url:
                  description: Single reference image URL alias for edit-video workflow.
                  title: Reference Image
                  format: uri
                  order: 6
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_refs:
                  description: Reference video URLs for reference workflow.
                  title: Reference Videos
                  order: 7
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                audio_url:
                  description: >-
                    Optional driving audio URL. Used in text/image and frames
                    workflows.
                  title: Audio
                  format: uri
                  order: 8
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                aspect_ratio:
                  description: Output aspect ratio.
                  title: Aspect Ratio
                  order: 9
                  default: '16:9'
                  type: string
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                    - '4:3'
                    - '3:4'
                resolution:
                  description: Output video resolution tier.
                  title: Resolution
                  order: 10
                  default: 1080p
                  type: string
                  enum:
                    - 720p
                    - 1080p
                duration:
                  description: Output video duration in seconds.
                  title: Duration
                  order: 11
                  default: 5
                  anyOf:
                    - type: number
                      const: 2
                    - type: number
                      const: 3
                    - type: number
                      const: 4
                    - type: number
                      const: 5
                    - type: number
                      const: 6
                    - type: number
                      const: 7
                    - type: number
                      const: 8
                    - type: number
                      const: 9
                    - type: number
                      const: 10
                    - type: number
                      const: 11
                    - type: number
                      const: 12
                    - type: number
                      const: 13
                    - type: number
                      const: 14
                    - type: number
                      const: 15
                negative_prompt:
                  description: Content to avoid in the generated video.
                  title: Negative Prompt
                  order: 12
                  anyOf:
                    - type: string
                    - type: 'null'
                enable_prompt_expansion:
                  description: Enable intelligent prompt rewriting.
                  title: Enable Prompt Expansion
                  order: 13
                  default: true
                  type: boolean
                multi_shots:
                  description: >-
                    Enable intelligent multi-shot segmentation. Used in
                    reference workflow.
                  title: Multi Shots
                  order: 14
                  default: false
                  type: boolean
                audio_setting:
                  description: Audio handling in edit-video mode.
                  title: Audio Setting
                  order: 15
                  default: auto
                  type: string
                  enum:
                    - auto
                    - origin
                seed:
                  description: Random seed for reproducibility.
                  title: Seed
                  order: 16
                  anyOf:
                    - type: integer
                      minimum: 0
                      maximum: 2147483647
                    - type: 'null'
              additionalProperties: {}
            - type: object
              properties:
                feature:
                  type: string
                  const: text-image
                duration: {}
                negative_prompt: {}
                enable_prompt_expansion: {}
                audio_url: {}
              additionalProperties: {}
        - title: Frames
          allOf:
            - title: Input
              xMeta:
                video_duration: video_url
                size: video_url
              type: object
              properties:
                feature:
                  description: >-
                    Workflow type: text/image-to-video, reference-to-video,
                    frames-to-video, or edit-video.
                  title: Feature
                  order: 0
                  type: string
                  const: frames
                prompt:
                  description: >-
                    Prompt text. Required for reference and edit-video modes,
                    optional for text/image and frames modes.
                  title: Prompt
                  order: 1
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                image_url:
                  description: Starting image URL for image or frames workflows.
                  title: Image
                  format: uri
                  order: 3
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                end_image_url:
                  description: >-
                    Optional ending image URL. Requires image_url and is
                    primarily used for frames workflow.
                  title: End Image
                  format: uri
                  order: 4
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_url:
                  description: >-
                    Optional continuation video URL for image workflow, or
                    required input video URL for edit-video workflow.
                  title: Video
                  format: uri
                  order: 5
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: video
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                reference_image_urls:
                  description: >-
                    Reference image URLs for reference workflow. In edit-video
                    workflow, only the first image is used.
                  title: Reference Images
                  order: 6
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                reference_image_url:
                  description: Single reference image URL alias for edit-video workflow.
                  title: Reference Image
                  format: uri
                  order: 6
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_refs:
                  description: Reference video URLs for reference workflow.
                  title: Reference Videos
                  order: 7
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                audio_url:
                  description: >-
                    Optional driving audio URL. Used in text/image and frames
                    workflows.
                  title: Audio
                  format: uri
                  order: 8
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                aspect_ratio:
                  description: Output aspect ratio.
                  title: Aspect Ratio
                  order: 9
                  default: '16:9'
                  type: string
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                    - '4:3'
                    - '3:4'
                resolution:
                  description: Output video resolution tier.
                  title: Resolution
                  order: 10
                  default: 1080p
                  type: string
                  enum:
                    - 720p
                    - 1080p
                duration:
                  description: Output video duration in seconds.
                  title: Duration
                  order: 11
                  default: 5
                  anyOf:
                    - type: number
                      const: 2
                    - type: number
                      const: 3
                    - type: number
                      const: 4
                    - type: number
                      const: 5
                    - type: number
                      const: 6
                    - type: number
                      const: 7
                    - type: number
                      const: 8
                    - type: number
                      const: 9
                    - type: number
                      const: 10
                    - type: number
                      const: 11
                    - type: number
                      const: 12
                    - type: number
                      const: 13
                    - type: number
                      const: 14
                    - type: number
                      const: 15
                negative_prompt:
                  description: Content to avoid in the generated video.
                  title: Negative Prompt
                  order: 12
                  anyOf:
                    - type: string
                    - type: 'null'
                enable_prompt_expansion:
                  description: Enable intelligent prompt rewriting.
                  title: Enable Prompt Expansion
                  order: 13
                  default: true
                  type: boolean
                multi_shots:
                  description: >-
                    Enable intelligent multi-shot segmentation. Used in
                    reference workflow.
                  title: Multi Shots
                  order: 14
                  default: false
                  type: boolean
                audio_setting:
                  description: Audio handling in edit-video mode.
                  title: Audio Setting
                  order: 15
                  default: auto
                  type: string
                  enum:
                    - auto
                    - origin
                seed:
                  description: Random seed for reproducibility.
                  title: Seed
                  order: 16
                  anyOf:
                    - type: integer
                      minimum: 0
                      maximum: 2147483647
                    - type: 'null'
              additionalProperties: {}
            - type: object
              properties:
                feature:
                  type: string
                  const: frames
                duration: {}
                negative_prompt: {}
                enable_prompt_expansion: {}
                audio_url: {}
                image_url: {}
              required:
                - image_url
              additionalProperties: {}
        - title: Reference
          allOf:
            - title: Input
              xMeta:
                video_duration: video_url
                size: video_url
              type: object
              properties:
                feature:
                  description: >-
                    Workflow type: text/image-to-video, reference-to-video,
                    frames-to-video, or edit-video.
                  title: Feature
                  order: 0
                  type: string
                  const: reference
                prompt:
                  description: >-
                    Prompt text. Required for reference and edit-video modes,
                    optional for text/image and frames modes.
                  title: Prompt
                  order: 1
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                image_url:
                  description: Starting image URL for image or frames workflows.
                  title: Image
                  format: uri
                  order: 3
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                end_image_url:
                  description: >-
                    Optional ending image URL. Requires image_url and is
                    primarily used for frames workflow.
                  title: End Image
                  format: uri
                  order: 4
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_url:
                  description: >-
                    Optional continuation video URL for image workflow, or
                    required input video URL for edit-video workflow.
                  title: Video
                  format: uri
                  order: 5
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: video
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                reference_image_urls:
                  description: >-
                    Reference image URLs for reference workflow. In edit-video
                    workflow, only the first image is used.
                  title: Reference Images
                  order: 6
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                reference_image_url:
                  description: Single reference image URL alias for edit-video workflow.
                  title: Reference Image
                  format: uri
                  order: 6
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_refs:
                  description: Reference video URLs for reference workflow.
                  title: Reference Videos
                  order: 7
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                audio_url:
                  description: >-
                    Optional driving audio URL. Used in text/image and frames
                    workflows.
                  title: Audio
                  format: uri
                  order: 8
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                aspect_ratio:
                  description: Output aspect ratio.
                  title: Aspect Ratio
                  order: 9
                  default: '16:9'
                  type: string
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                    - '4:3'
                    - '3:4'
                resolution:
                  description: Output video resolution tier.
                  title: Resolution
                  order: 10
                  default: 1080p
                  type: string
                  enum:
                    - 720p
                    - 1080p
                duration:
                  description: Output video duration in seconds.
                  title: Duration
                  order: 11
                  default: 5
                  anyOf:
                    - type: number
                      const: 2
                    - type: number
                      const: 3
                    - type: number
                      const: 4
                    - type: number
                      const: 5
                    - type: number
                      const: 6
                    - type: number
                      const: 7
                    - type: number
                      const: 8
                    - type: number
                      const: 9
                    - type: number
                      const: 10
                    - type: number
                      const: 11
                    - type: number
                      const: 12
                    - type: number
                      const: 13
                    - type: number
                      const: 14
                    - type: number
                      const: 15
                negative_prompt:
                  description: Content to avoid in the generated video.
                  title: Negative Prompt
                  order: 12
                  anyOf:
                    - type: string
                    - type: 'null'
                enable_prompt_expansion:
                  description: Enable intelligent prompt rewriting.
                  title: Enable Prompt Expansion
                  order: 13
                  default: true
                  type: boolean
                multi_shots:
                  description: >-
                    Enable intelligent multi-shot segmentation. Used in
                    reference workflow.
                  title: Multi Shots
                  order: 14
                  default: false
                  type: boolean
                audio_setting:
                  description: Audio handling in edit-video mode.
                  title: Audio Setting
                  order: 15
                  default: auto
                  type: string
                  enum:
                    - auto
                    - origin
                seed:
                  description: Random seed for reproducibility.
                  title: Seed
                  order: 16
                  anyOf:
                    - type: integer
                      minimum: 0
                      maximum: 2147483647
                    - type: 'null'
              additionalProperties: {}
            - type: object
              properties:
                feature:
                  type: string
                  const: reference
                duration:
                  anyOf:
                    - type: number
                      const: 2
                    - type: number
                      const: 3
                    - type: number
                      const: 4
                    - type: number
                      const: 5
                    - type: number
                      const: 6
                    - type: number
                      const: 7
                    - type: number
                      const: 8
                    - type: number
                      const: 9
                    - type: number
                      const: 10
                negative_prompt: {}
                enable_prompt_expansion: {}
                multi_shots: {}
                prompt: {}
              required:
                - prompt
              additionalProperties: {}
        - title: Edit Video
          allOf:
            - title: Input
              xMeta:
                video_duration: video_url
                size: video_url
              type: object
              properties:
                feature:
                  description: >-
                    Workflow type: text/image-to-video, reference-to-video,
                    frames-to-video, or edit-video.
                  title: Feature
                  order: 0
                  type: string
                  const: edit-video
                prompt:
                  description: >-
                    Prompt text. Required for reference and edit-video modes,
                    optional for text/image and frames modes.
                  title: Prompt
                  order: 1
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                image_url:
                  description: Starting image URL for image or frames workflows.
                  title: Image
                  format: uri
                  order: 3
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                end_image_url:
                  description: >-
                    Optional ending image URL. Requires image_url and is
                    primarily used for frames workflow.
                  title: End Image
                  format: uri
                  order: 4
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_url:
                  description: >-
                    Optional continuation video URL for image workflow, or
                    required input video URL for edit-video workflow.
                  title: Video
                  format: uri
                  order: 5
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: video
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                reference_image_urls:
                  description: >-
                    Reference image URLs for reference workflow. In edit-video
                    workflow, only the first image is used.
                  title: Reference Images
                  order: 6
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                reference_image_url:
                  description: Single reference image URL alias for edit-video workflow.
                  title: Reference Image
                  format: uri
                  order: 6
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_refs:
                  description: Reference video URLs for reference workflow.
                  title: Reference Videos
                  order: 7
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                audio_url:
                  description: >-
                    Optional driving audio URL. Used in text/image and frames
                    workflows.
                  title: Audio
                  format: uri
                  order: 8
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                aspect_ratio:
                  description: Output aspect ratio.
                  title: Aspect Ratio
                  order: 9
                  default: '16:9'
                  type: string
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                    - '4:3'
                    - '3:4'
                resolution:
                  description: Output video resolution tier.
                  title: Resolution
                  order: 10
                  default: 1080p
                  type: string
                  enum:
                    - 720p
                    - 1080p
                duration:
                  description: Output video duration in seconds.
                  title: Duration
                  order: 11
                  default: 5
                  anyOf:
                    - type: number
                      const: 2
                    - type: number
                      const: 3
                    - type: number
                      const: 4
                    - type: number
                      const: 5
                    - type: number
                      const: 6
                    - type: number
                      const: 7
                    - type: number
                      const: 8
                    - type: number
                      const: 9
                    - type: number
                      const: 10
                    - type: number
                      const: 11
                    - type: number
                      const: 12
                    - type: number
                      const: 13
                    - type: number
                      const: 14
                    - type: number
                      const: 15
                negative_prompt:
                  description: Content to avoid in the generated video.
                  title: Negative Prompt
                  order: 12
                  anyOf:
                    - type: string
                    - type: 'null'
                enable_prompt_expansion:
                  description: Enable intelligent prompt rewriting.
                  title: Enable Prompt Expansion
                  order: 13
                  default: true
                  type: boolean
                multi_shots:
                  description: >-
                    Enable intelligent multi-shot segmentation. Used in
                    reference workflow.
                  title: Multi Shots
                  order: 14
                  default: false
                  type: boolean
                audio_setting:
                  description: Audio handling in edit-video mode.
                  title: Audio Setting
                  order: 15
                  default: auto
                  type: string
                  enum:
                    - auto
                    - origin
                seed:
                  description: Random seed for reproducibility.
                  title: Seed
                  order: 16
                  anyOf:
                    - type: integer
                      minimum: 0
                      maximum: 2147483647
                    - type: 'null'
              additionalProperties: {}
            - type: object
              properties:
                feature:
                  type: string
                  const: edit-video
                reference_image_url:
                  format: uri
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                audio_setting:
                  type: string
                  enum:
                    - auto
                    - origin
                duration:
                  default: 0
                  anyOf:
                    - type: number
                      const: 0
                    - type: number
                      const: 2
                    - type: number
                      const: 3
                    - type: number
                      const: 4
                    - type: number
                      const: 5
                    - type: number
                      const: 6
                    - type: number
                      const: 7
                    - type: number
                      const: 8
                    - type: number
                      const: 9
                    - type: number
                      const: 10
                prompt: {}
                video_url: {}
              required:
                - prompt
                - video_url
              additionalProperties: {}
    QueueState:
      description: Queue status
      type: string
      enum:
        - IN_QUEUE
        - IN_PROGRESS
        - COMPLETED
        - FAILED
        - CANCELED
    wan_wan_v2_7_videoInputOutput:
      $ref: '#/components/schemas/__schema59'
      title: Input
      xMeta:
        video_duration: video_url
        size: video_url
    Usage:
      description: Credit usage breakdown for the request
      type: object
      properties:
        total:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        subscription:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
        permanent:
          type: integer
          minimum: -9007199254740991
          maximum: 9007199254740991
      required:
        - total
        - subscription
        - permanent
      additionalProperties: false
    __schema1:
      description: >-
        Machine-readable generation error code. Present when `status` is
        `FAILED`.
      type: string
    __schema2:
      description: >-
        Sanitized human-readable failure message. Present when `status` is
        `FAILED`.
      type: string
    __schema59:
      title: Input
      oneOf:
        - title: Text/Image
          allOf:
            - title: Input
              xMeta:
                video_duration: video_url
                size: video_url
              type: object
              properties:
                feature:
                  description: >-
                    Workflow type: text/image-to-video, reference-to-video,
                    frames-to-video, or edit-video.
                  title: Feature
                  order: 0
                  type: string
                  const: text-image
                prompt:
                  description: >-
                    Prompt text. Required for reference and edit-video modes,
                    optional for text/image and frames modes.
                  title: Prompt
                  order: 1
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                image_url:
                  description: Starting image URL for image or frames workflows.
                  title: Image
                  format: uri
                  order: 3
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                end_image_url:
                  description: >-
                    Optional ending image URL. Requires image_url and is
                    primarily used for frames workflow.
                  title: End Image
                  format: uri
                  order: 4
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_url:
                  description: >-
                    Optional continuation video URL for image workflow, or
                    required input video URL for edit-video workflow.
                  title: Video
                  format: uri
                  order: 5
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: video
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                reference_image_urls:
                  description: >-
                    Reference image URLs for reference workflow. In edit-video
                    workflow, only the first image is used.
                  title: Reference Images
                  order: 6
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                reference_image_url:
                  description: Single reference image URL alias for edit-video workflow.
                  title: Reference Image
                  format: uri
                  order: 6
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_refs:
                  description: Reference video URLs for reference workflow.
                  title: Reference Videos
                  order: 7
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                audio_url:
                  description: >-
                    Optional driving audio URL. Used in text/image and frames
                    workflows.
                  title: Audio
                  format: uri
                  order: 8
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                aspect_ratio:
                  description: Output aspect ratio.
                  title: Aspect Ratio
                  order: 9
                  default: '16:9'
                  type: string
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                    - '4:3'
                    - '3:4'
                resolution:
                  description: Output video resolution tier.
                  title: Resolution
                  order: 10
                  default: 1080p
                  type: string
                  enum:
                    - 720p
                    - 1080p
                duration:
                  description: Output video duration in seconds.
                  title: Duration
                  order: 11
                  default: 5
                  anyOf:
                    - type: number
                      const: 2
                    - type: number
                      const: 3
                    - type: number
                      const: 4
                    - type: number
                      const: 5
                    - type: number
                      const: 6
                    - type: number
                      const: 7
                    - type: number
                      const: 8
                    - type: number
                      const: 9
                    - type: number
                      const: 10
                    - type: number
                      const: 11
                    - type: number
                      const: 12
                    - type: number
                      const: 13
                    - type: number
                      const: 14
                    - type: number
                      const: 15
                negative_prompt:
                  description: Content to avoid in the generated video.
                  title: Negative Prompt
                  order: 12
                  anyOf:
                    - type: string
                    - type: 'null'
                enable_prompt_expansion:
                  description: Enable intelligent prompt rewriting.
                  title: Enable Prompt Expansion
                  order: 13
                  default: true
                  type: boolean
                multi_shots:
                  description: >-
                    Enable intelligent multi-shot segmentation. Used in
                    reference workflow.
                  title: Multi Shots
                  order: 14
                  default: false
                  type: boolean
                audio_setting:
                  description: Audio handling in edit-video mode.
                  title: Audio Setting
                  order: 15
                  default: auto
                  type: string
                  enum:
                    - auto
                    - origin
                seed:
                  description: Random seed for reproducibility.
                  title: Seed
                  order: 16
                  anyOf:
                    - type: integer
                      minimum: 0
                      maximum: 2147483647
                    - type: 'null'
              additionalProperties: {}
            - type: object
              properties:
                feature:
                  type: string
                  const: text-image
                duration: {}
                negative_prompt: {}
                enable_prompt_expansion: {}
                audio_url: {}
              additionalProperties: {}
        - title: Frames
          allOf:
            - title: Input
              xMeta:
                video_duration: video_url
                size: video_url
              type: object
              properties:
                feature:
                  description: >-
                    Workflow type: text/image-to-video, reference-to-video,
                    frames-to-video, or edit-video.
                  title: Feature
                  order: 0
                  type: string
                  const: frames
                prompt:
                  description: >-
                    Prompt text. Required for reference and edit-video modes,
                    optional for text/image and frames modes.
                  title: Prompt
                  order: 1
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                image_url:
                  description: Starting image URL for image or frames workflows.
                  title: Image
                  format: uri
                  order: 3
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                end_image_url:
                  description: >-
                    Optional ending image URL. Requires image_url and is
                    primarily used for frames workflow.
                  title: End Image
                  format: uri
                  order: 4
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_url:
                  description: >-
                    Optional continuation video URL for image workflow, or
                    required input video URL for edit-video workflow.
                  title: Video
                  format: uri
                  order: 5
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: video
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                reference_image_urls:
                  description: >-
                    Reference image URLs for reference workflow. In edit-video
                    workflow, only the first image is used.
                  title: Reference Images
                  order: 6
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                reference_image_url:
                  description: Single reference image URL alias for edit-video workflow.
                  title: Reference Image
                  format: uri
                  order: 6
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_refs:
                  description: Reference video URLs for reference workflow.
                  title: Reference Videos
                  order: 7
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                audio_url:
                  description: >-
                    Optional driving audio URL. Used in text/image and frames
                    workflows.
                  title: Audio
                  format: uri
                  order: 8
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                aspect_ratio:
                  description: Output aspect ratio.
                  title: Aspect Ratio
                  order: 9
                  default: '16:9'
                  type: string
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                    - '4:3'
                    - '3:4'
                resolution:
                  description: Output video resolution tier.
                  title: Resolution
                  order: 10
                  default: 1080p
                  type: string
                  enum:
                    - 720p
                    - 1080p
                duration:
                  description: Output video duration in seconds.
                  title: Duration
                  order: 11
                  default: 5
                  anyOf:
                    - type: number
                      const: 2
                    - type: number
                      const: 3
                    - type: number
                      const: 4
                    - type: number
                      const: 5
                    - type: number
                      const: 6
                    - type: number
                      const: 7
                    - type: number
                      const: 8
                    - type: number
                      const: 9
                    - type: number
                      const: 10
                    - type: number
                      const: 11
                    - type: number
                      const: 12
                    - type: number
                      const: 13
                    - type: number
                      const: 14
                    - type: number
                      const: 15
                negative_prompt:
                  description: Content to avoid in the generated video.
                  title: Negative Prompt
                  order: 12
                  anyOf:
                    - type: string
                    - type: 'null'
                enable_prompt_expansion:
                  description: Enable intelligent prompt rewriting.
                  title: Enable Prompt Expansion
                  order: 13
                  default: true
                  type: boolean
                multi_shots:
                  description: >-
                    Enable intelligent multi-shot segmentation. Used in
                    reference workflow.
                  title: Multi Shots
                  order: 14
                  default: false
                  type: boolean
                audio_setting:
                  description: Audio handling in edit-video mode.
                  title: Audio Setting
                  order: 15
                  default: auto
                  type: string
                  enum:
                    - auto
                    - origin
                seed:
                  description: Random seed for reproducibility.
                  title: Seed
                  order: 16
                  anyOf:
                    - type: integer
                      minimum: 0
                      maximum: 2147483647
                    - type: 'null'
              additionalProperties: {}
            - type: object
              properties:
                feature:
                  type: string
                  const: frames
                duration: {}
                negative_prompt: {}
                enable_prompt_expansion: {}
                audio_url: {}
                image_url: {}
              required:
                - image_url
              additionalProperties: {}
        - title: Reference
          allOf:
            - title: Input
              xMeta:
                video_duration: video_url
                size: video_url
              type: object
              properties:
                feature:
                  description: >-
                    Workflow type: text/image-to-video, reference-to-video,
                    frames-to-video, or edit-video.
                  title: Feature
                  order: 0
                  type: string
                  const: reference
                prompt:
                  description: >-
                    Prompt text. Required for reference and edit-video modes,
                    optional for text/image and frames modes.
                  title: Prompt
                  order: 1
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                image_url:
                  description: Starting image URL for image or frames workflows.
                  title: Image
                  format: uri
                  order: 3
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                end_image_url:
                  description: >-
                    Optional ending image URL. Requires image_url and is
                    primarily used for frames workflow.
                  title: End Image
                  format: uri
                  order: 4
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_url:
                  description: >-
                    Optional continuation video URL for image workflow, or
                    required input video URL for edit-video workflow.
                  title: Video
                  format: uri
                  order: 5
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: video
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                reference_image_urls:
                  description: >-
                    Reference image URLs for reference workflow. In edit-video
                    workflow, only the first image is used.
                  title: Reference Images
                  order: 6
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                reference_image_url:
                  description: Single reference image URL alias for edit-video workflow.
                  title: Reference Image
                  format: uri
                  order: 6
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_refs:
                  description: Reference video URLs for reference workflow.
                  title: Reference Videos
                  order: 7
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                audio_url:
                  description: >-
                    Optional driving audio URL. Used in text/image and frames
                    workflows.
                  title: Audio
                  format: uri
                  order: 8
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                aspect_ratio:
                  description: Output aspect ratio.
                  title: Aspect Ratio
                  order: 9
                  default: '16:9'
                  type: string
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                    - '4:3'
                    - '3:4'
                resolution:
                  description: Output video resolution tier.
                  title: Resolution
                  order: 10
                  default: 1080p
                  type: string
                  enum:
                    - 720p
                    - 1080p
                duration:
                  description: Output video duration in seconds.
                  title: Duration
                  order: 11
                  default: 5
                  anyOf:
                    - type: number
                      const: 2
                    - type: number
                      const: 3
                    - type: number
                      const: 4
                    - type: number
                      const: 5
                    - type: number
                      const: 6
                    - type: number
                      const: 7
                    - type: number
                      const: 8
                    - type: number
                      const: 9
                    - type: number
                      const: 10
                    - type: number
                      const: 11
                    - type: number
                      const: 12
                    - type: number
                      const: 13
                    - type: number
                      const: 14
                    - type: number
                      const: 15
                negative_prompt:
                  description: Content to avoid in the generated video.
                  title: Negative Prompt
                  order: 12
                  anyOf:
                    - type: string
                    - type: 'null'
                enable_prompt_expansion:
                  description: Enable intelligent prompt rewriting.
                  title: Enable Prompt Expansion
                  order: 13
                  default: true
                  type: boolean
                multi_shots:
                  description: >-
                    Enable intelligent multi-shot segmentation. Used in
                    reference workflow.
                  title: Multi Shots
                  order: 14
                  default: false
                  type: boolean
                audio_setting:
                  description: Audio handling in edit-video mode.
                  title: Audio Setting
                  order: 15
                  default: auto
                  type: string
                  enum:
                    - auto
                    - origin
                seed:
                  description: Random seed for reproducibility.
                  title: Seed
                  order: 16
                  anyOf:
                    - type: integer
                      minimum: 0
                      maximum: 2147483647
                    - type: 'null'
              additionalProperties: {}
            - type: object
              properties:
                feature:
                  type: string
                  const: reference
                duration:
                  anyOf:
                    - type: number
                      const: 2
                    - type: number
                      const: 3
                    - type: number
                      const: 4
                    - type: number
                      const: 5
                    - type: number
                      const: 6
                    - type: number
                      const: 7
                    - type: number
                      const: 8
                    - type: number
                      const: 9
                    - type: number
                      const: 10
                negative_prompt: {}
                enable_prompt_expansion: {}
                multi_shots: {}
                prompt: {}
              required:
                - prompt
              additionalProperties: {}
        - title: Edit Video
          allOf:
            - title: Input
              xMeta:
                video_duration: video_url
                size: video_url
              type: object
              properties:
                feature:
                  description: >-
                    Workflow type: text/image-to-video, reference-to-video,
                    frames-to-video, or edit-video.
                  title: Feature
                  order: 0
                  type: string
                  const: edit-video
                prompt:
                  description: >-
                    Prompt text. Required for reference and edit-video modes,
                    optional for text/image and frames modes.
                  title: Prompt
                  order: 1
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                image_url:
                  description: Starting image URL for image or frames workflows.
                  title: Image
                  format: uri
                  order: 3
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                end_image_url:
                  description: >-
                    Optional ending image URL. Requires image_url and is
                    primarily used for frames workflow.
                  title: End Image
                  format: uri
                  order: 4
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: image
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_url:
                  description: >-
                    Optional continuation video URL for image workflow, or
                    required input video URL for edit-video workflow.
                  title: Video
                  format: uri
                  order: 5
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: video
                    activeWhen: nonEmpty
                    interaction: disable
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                reference_image_urls:
                  description: >-
                    Reference image URLs for reference workflow. In edit-video
                    workflow, only the first image is used.
                  title: Reference Images
                  order: 6
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                reference_image_url:
                  description: Single reference image URL alias for edit-video workflow.
                  title: Reference Image
                  format: uri
                  order: 6
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                video_refs:
                  description: Reference video URLs for reference workflow.
                  title: Reference Videos
                  order: 7
                  xUiContract:
                    type: mutex
                    mutexRule: wan_v27_video_input_mode
                    branch: reference
                    activeWhen: nonEmpty
                    interaction: disable
                  maxItems: 8
                  type: array
                  items:
                    format: uri
                    type: string
                audio_url:
                  description: >-
                    Optional driving audio URL. Used in text/image and frames
                    workflows.
                  title: Audio
                  format: uri
                  order: 8
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                aspect_ratio:
                  description: Output aspect ratio.
                  title: Aspect Ratio
                  order: 9
                  default: '16:9'
                  type: string
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                    - '4:3'
                    - '3:4'
                resolution:
                  description: Output video resolution tier.
                  title: Resolution
                  order: 10
                  default: 1080p
                  type: string
                  enum:
                    - 720p
                    - 1080p
                duration:
                  description: Output video duration in seconds.
                  title: Duration
                  order: 11
                  default: 5
                  anyOf:
                    - type: number
                      const: 2
                    - type: number
                      const: 3
                    - type: number
                      const: 4
                    - type: number
                      const: 5
                    - type: number
                      const: 6
                    - type: number
                      const: 7
                    - type: number
                      const: 8
                    - type: number
                      const: 9
                    - type: number
                      const: 10
                    - type: number
                      const: 11
                    - type: number
                      const: 12
                    - type: number
                      const: 13
                    - type: number
                      const: 14
                    - type: number
                      const: 15
                negative_prompt:
                  description: Content to avoid in the generated video.
                  title: Negative Prompt
                  order: 12
                  anyOf:
                    - type: string
                    - type: 'null'
                enable_prompt_expansion:
                  description: Enable intelligent prompt rewriting.
                  title: Enable Prompt Expansion
                  order: 13
                  default: true
                  type: boolean
                multi_shots:
                  description: >-
                    Enable intelligent multi-shot segmentation. Used in
                    reference workflow.
                  title: Multi Shots
                  order: 14
                  default: false
                  type: boolean
                audio_setting:
                  description: Audio handling in edit-video mode.
                  title: Audio Setting
                  order: 15
                  default: auto
                  type: string
                  enum:
                    - auto
                    - origin
                seed:
                  description: Random seed for reproducibility.
                  title: Seed
                  order: 16
                  anyOf:
                    - type: integer
                      minimum: 0
                      maximum: 2147483647
                    - type: 'null'
              additionalProperties: {}
            - type: object
              properties:
                feature:
                  type: string
                  const: edit-video
                reference_image_url:
                  format: uri
                  anyOf:
                    - format: uri
                      type: string
                    - type: 'null'
                audio_setting:
                  type: string
                  enum:
                    - auto
                    - origin
                duration:
                  default: 0
                  anyOf:
                    - type: number
                      const: 0
                    - type: number
                      const: 2
                    - type: number
                      const: 3
                    - type: number
                      const: 4
                    - type: number
                      const: 5
                    - type: number
                      const: 6
                    - type: number
                      const: 7
                    - type: number
                      const: 8
                    - type: number
                      const: 9
                    - type: number
                      const: 10
                prompt: {}
                video_url: {}
              required:
                - prompt
                - video_url
              additionalProperties: {}
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API Key for API endpoints

````