{
  "openapi": "3.1.0",
  "info": {
    "title": "QwenWork Internal Execution Contract",
    "version": "1.0",
    "description": "Private execution contract. Customer keys, pricing, billing, artifact storage and asset preprocessing belong to the platform. Media adapters require deployment generation/experimental switches plus an active bounded execution plan. Local completed samples verify only their exact request combinations; other parameters, account permissions and pricing remain unverified. Existing idempotent submissions can still be recovered when generation is disabled."
  },
  "servers": [
    {
      "url": "http://127.0.0.1:7865",
      "description": "Local example only; remote deploy must use private routing/TLS."
    }
  ],
  "security": [
    {
      "IntegrationKey": []
    }
  ],
  "paths": {
    "/internal/v1/info": {
      "get": {
        "summary": "Provider readiness and features",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Key invalid or disabled"
          },
          "403": {
            "description": "Integration scope required"
          },
          "404": {
            "description": "Not found within this integration key"
          },
          "503": {
            "description": "Generation not ready or unavailable"
          }
        }
      }
    },
    "/internal/v1/models": {
      "get": {
        "summary": "Configured model schemas and observed successful request profiles",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Key invalid or disabled"
          },
          "403": {
            "description": "Integration scope required"
          },
          "404": {
            "description": "Not found within this integration key"
          },
          "503": {
            "description": "Generation not ready or unavailable"
          }
        }
      }
    },
    "/internal/v1/balance": {
      "get": {
        "summary": "Cached upstream quota; never a customer wallet",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "description": "Key invalid or disabled"
          },
          "403": {
            "description": "Integration scope required"
          },
          "404": {
            "description": "Not found within this integration key"
          },
          "503": {
            "description": "Generation not ready or unavailable"
          }
        }
      }
    },
    "/internal/v1/videos/generations": {
      "post": {
        "summary": "Submit one asynchronous video task",
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "description": "Key invalid or disabled"
          },
          "403": {
            "description": "Integration scope required"
          },
          "404": {
            "description": "Not found within this integration key"
          },
          "409": {
            "description": "Idempotency conflict: an existing request may already be accepted. Recover original request; never automatically retry with another id or refund as a new rejection."
          },
          "429": {
            "description": "No new acceptance: execution_daily_limit or task_quota_exceeded. Recover any earlier unknown request by the same request_id before releasing a prior order."
          },
          "503": {
            "description": "Generation not ready or unavailable"
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,160}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VideoSubmission"
              }
            }
          }
        },
        "description": "Wan3 plus opt-in Seedance 2.0 modes. Seedance requires QW_ENABLE_SEEDANCE=1 and global QW_ALLOW_LIVE=1. Use GET /internal/v1/requests/{request_id} after a lost response; do not switch channels and resubmit."
      }
    },
    "/internal/v1/videos/{task_id}": {
      "get": {
        "summary": "Query original task",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "description": "Key invalid or disabled"
          },
          "403": {
            "description": "Integration scope required"
          },
          "404": {
            "description": "Not found within this integration key"
          },
          "503": {
            "description": "Generation not ready or unavailable"
          }
        },
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/internal/v1/requests/{request_id}": {
      "get": {
        "summary": "Recover original task using Idempotency-Key",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "description": "Key invalid or disabled"
          },
          "403": {
            "description": "Integration scope required"
          },
          "404": {
            "description": "Not found within this integration key"
          },
          "503": {
            "description": "Generation not ready or unavailable"
          }
        },
        "parameters": [
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/internal/v1/tasks": {
      "get": {
        "summary": "List tasks owned by this integration key",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Task"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Key invalid or disabled"
          },
          "403": {
            "description": "Integration scope required"
          },
          "404": {
            "description": "Not found within this integration key"
          },
          "503": {
            "description": "Generation not ready or unavailable"
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 200,
              "default": 50
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 0,
              "default": 0
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/internal/v1/images/generations": {
      "post": {
        "summary": "Submit experimental asynchronous image generation",
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "description": "Key invalid or disabled"
          },
          "403": {
            "description": "Integration scope required"
          },
          "404": {
            "description": "Not found within this integration key"
          },
          "409": {
            "description": "Idempotency conflict: an existing request may already be accepted. Recover original request; never automatically retry with another id or refund as a new rejection."
          },
          "429": {
            "description": "No new acceptance: execution_daily_limit or task_quota_exceeded. Recover any earlier unknown request by the same request_id before releasing a prior order."
          },
          "503": {
            "description": "Generation not ready or unavailable"
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,160}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageRequest"
              }
            }
          }
        },
        "description": "JSON asynchronous extension, not an OpenAI synchronous image response or multipart edit. Disabled by default. Desktop routes confirmed, web permissions and live output unverified."
      }
    },
    "/internal/v1/images/edits": {
      "post": {
        "summary": "Submit experimental asynchronous image edit",
        "responses": {
          "202": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "description": "Key invalid or disabled"
          },
          "403": {
            "description": "Integration scope required"
          },
          "404": {
            "description": "Not found within this integration key"
          },
          "409": {
            "description": "Idempotency conflict: an existing request may already be accepted. Recover original request; never automatically retry with another id or refund as a new rejection."
          },
          "429": {
            "description": "No new acceptance: execution_daily_limit or task_quota_exceeded. Recover any earlier unknown request by the same request_id before releasing a prior order."
          },
          "503": {
            "description": "Generation not ready or unavailable"
          }
        },
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9._:-]{1,160}$"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ImageEditRequest"
              }
            }
          }
        },
        "description": "JSON asynchronous extension, not an OpenAI synchronous image response or multipart edit. Disabled by default. Desktop routes confirmed, web permissions and live output unverified."
      }
    },
    "/internal/v1/images/{task_id}": {
      "get": {
        "summary": "Query original image task even when new image generation is disabled",
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Task"
                }
              }
            }
          },
          "401": {
            "description": "Key invalid or disabled"
          },
          "403": {
            "description": "Integration scope required"
          },
          "404": {
            "description": "Not found within this integration key"
          },
          "503": {
            "description": "Generation not ready or unavailable"
          }
        },
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "IntegrationKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "Platform-only integration key. Never a customer key or local admin key."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message"
            ],
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "Task": {
        "type": "object",
        "required": [
          "id",
          "status",
          "model",
          "data"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "object": {
            "enum": [
              "video",
              "image"
            ]
          },
          "model": {
            "type": "string"
          },
          "status": {
            "enum": [
              "queued",
              "auth_preparing",
              "submitting",
              "submitted",
              "processing",
              "completed",
              "failed",
              "requires_review",
              "cancelled"
            ]
          },
          "created_at": {
            "type": "integer",
            "description": "Unix seconds"
          },
          "updated_at": {
            "type": "integer"
          },
          "request_id": {
            "type": "string"
          },
          "duplicate": {
            "type": "boolean"
          },
          "usage": {
            "type": "object",
            "properties": {
              "credit": {
                "type": [
                  "number",
                  "null"
                ]
              },
              "billing_state": {
                "type": "string"
              }
            }
          },
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri"
                }
              }
            }
          },
          "error": {
            "type": "object"
          }
        }
      },
      "VideoRequest": {
        "type": "object",
        "required": [
          "model"
        ],
        "properties": {
          "model": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "duration": {
            "type": "integer",
            "enum": [
              -1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9,
              10,
              11,
              12,
              13,
              14,
              15,
              16,
              17,
              18,
              19,
              20,
              21,
              22,
              23,
              24,
              25,
              26,
              27,
              28,
              29,
              30
            ]
          },
          "resolution": {
            "enum": [
              "480P",
              "720P",
              "1080P"
            ]
          },
          "ratio": {
            "enum": [
              "16:9",
              "4:3",
              "1:1",
              "3:4",
              "9:16",
              "adaptive"
            ]
          },
          "audio": {
            "type": "boolean"
          },
          "seed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 2147483647
          },
          "prompt_extend": {
            "type": "boolean"
          },
          "first_frame": {
            "type": "string"
          },
          "last_frame": {
            "type": "string"
          },
          "reference_images": {
            "type": "array",
            "maxItems": 10,
            "items": {
              "type": "string"
            }
          },
          "reference_videos": {
            "type": "array",
            "maxItems": 5,
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "reference_audios": {
            "type": "array",
            "maxItems": 5,
            "items": {
              "type": "string",
              "format": "uri"
            }
          }
        },
        "description": "Native Wan3 example. Media cross-field constraints are additionally enforced by the provider; model catalog is authoritative for schema capabilities."
      },
      "ImageRequest": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "model",
              "prompt"
            ],
            "properties": {
              "model": {
                "enum": [
                  "open-image-2",
                  "gpt-image-2",
                  "gpt-image2",
                  "qwenwork/open-image-2"
                ]
              },
              "prompt": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2500
              },
              "size": {
                "type": "string",
                "description": "auto, preset or validated WIDTHxHEIGHT; see IMAGES.md"
              },
              "quality": {
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "auto"
                ]
              },
              "n": {
                "type": "integer",
                "minimum": 1,
                "maximum": 4
              },
              "output_format": {
                "enum": [
                  "png",
                  "jpeg",
                  "webp"
                ]
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "model",
              "prompt"
            ],
            "properties": {
              "model": {
                "enum": [
                  "banana-image-2",
                  "qwenwork/banana-image-2",
                  "nano-banana-2"
                ]
              },
              "prompt": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2500
              },
              "aspect_ratio": {
                "enum": [
                  "1:1",
                  "2:3",
                  "3:2",
                  "3:4",
                  "4:3",
                  "4:5",
                  "5:4",
                  "5:8",
                  "9:16",
                  "16:9",
                  "9:21",
                  "21:9",
                  "1:2",
                  "2:1"
                ]
              },
              "resolution": {
                "enum": [
                  "1K",
                  "2K",
                  "4K"
                ]
              },
              "web_search": {
                "type": "boolean"
              }
            }
          }
        ]
      },
      "ImageEditRequest": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "model",
              "prompt",
              "images"
            ],
            "properties": {
              "model": {
                "enum": [
                  "open-image-2",
                  "gpt-image-2",
                  "gpt-image2",
                  "qwenwork/open-image-2"
                ]
              },
              "prompt": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2500
              },
              "size": {
                "type": "string",
                "description": "auto, preset or validated WIDTHxHEIGHT; see IMAGES.md"
              },
              "quality": {
                "enum": [
                  "low",
                  "medium",
                  "high",
                  "auto"
                ]
              },
              "n": {
                "type": "integer",
                "minimum": 1,
                "maximum": 4
              },
              "output_format": {
                "enum": [
                  "png",
                  "jpeg",
                  "webp"
                ]
              },
              "mask": {
                "type": "string",
                "description": "HTTPS image URL or supported image data URI"
              },
              "images": {
                "type": "array",
                "minItems": 1,
                "maxItems": 14,
                "items": {
                  "type": "string",
                  "description": "HTTPS image URL or PNG/JPEG/WebP data URI; no local paths"
                }
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "model",
              "prompt",
              "images"
            ],
            "properties": {
              "model": {
                "enum": [
                  "banana-image-2",
                  "qwenwork/banana-image-2",
                  "nano-banana-2"
                ]
              },
              "prompt": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2500
              },
              "aspect_ratio": {
                "enum": [
                  "1:1",
                  "2:3",
                  "3:2",
                  "3:4",
                  "4:3",
                  "4:5",
                  "5:4",
                  "5:8",
                  "9:16",
                  "16:9",
                  "9:21",
                  "21:9",
                  "1:2",
                  "2:1"
                ]
              },
              "resolution": {
                "enum": [
                  "1K",
                  "2K",
                  "4K"
                ]
              },
              "web_search": {
                "type": "boolean"
              },
              "images": {
                "type": "array",
                "minItems": 1,
                "maxItems": 14,
                "items": {
                  "type": "string",
                  "description": "HTTPS image URL or PNG/JPEG/WebP data URI; no local paths"
                }
              }
            }
          }
        ]
      },
      "SeedanceRequest": {
        "description": "Experimental, explicit mode required. Aliases must agree. Optional duration, audio and other controls are omitted when absent. Desktop routes confirmed; web permissions and cost unverified.",
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "model",
              "mode",
              "prompt"
            ],
            "properties": {
              "model": {
                "enum": [
                  "seedance-2.0",
                  "seedance",
                  "qwenwork/seedance-2.0",
                  "sd2.0"
                ]
              },
              "prompt": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2500
              },
              "resolution": {
                "enum": [
                  "480p",
                  "720p",
                  "1080p",
                  "4k"
                ]
              },
              "seed": {
                "type": "integer",
                "minimum": -1,
                "maximum": 4294967295
              },
              "duration": {
                "type": "integer",
                "minimum": 4,
                "maximum": 15
              },
              "duration_seconds": {
                "type": "integer",
                "minimum": 4,
                "maximum": 15
              },
              "seconds": {
                "type": "integer",
                "minimum": 4,
                "maximum": 15
              },
              "aspect_ratio": {
                "enum": [
                  "16:9",
                  "4:3",
                  "1:1",
                  "3:4",
                  "9:16",
                  "21:9",
                  "adaptive"
                ]
              },
              "ratio": {
                "enum": [
                  "16:9",
                  "4:3",
                  "1:1",
                  "3:4",
                  "9:16",
                  "21:9",
                  "adaptive"
                ]
              },
              "generate_audio": {
                "type": "boolean"
              },
              "audio": {
                "type": "boolean"
              },
              "mode": {
                "const": "text_to_video"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "model",
              "mode",
              "prompt"
            ],
            "properties": {
              "model": {
                "enum": [
                  "seedance-2.0",
                  "seedance",
                  "qwenwork/seedance-2.0",
                  "sd2.0"
                ]
              },
              "prompt": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2500
              },
              "resolution": {
                "enum": [
                  "480p",
                  "720p",
                  "1080p",
                  "4k"
                ]
              },
              "seed": {
                "type": "integer",
                "minimum": -1,
                "maximum": 4294967295
              },
              "duration": {
                "type": "integer",
                "minimum": 4,
                "maximum": 15
              },
              "duration_seconds": {
                "type": "integer",
                "minimum": 4,
                "maximum": 15
              },
              "seconds": {
                "type": "integer",
                "minimum": 4,
                "maximum": 15
              },
              "aspect_ratio": {
                "enum": [
                  "16:9",
                  "4:3",
                  "1:1",
                  "3:4",
                  "9:16",
                  "21:9",
                  "adaptive"
                ]
              },
              "ratio": {
                "enum": [
                  "16:9",
                  "4:3",
                  "1:1",
                  "3:4",
                  "9:16",
                  "21:9",
                  "adaptive"
                ]
              },
              "generate_audio": {
                "type": "boolean"
              },
              "audio": {
                "type": "boolean"
              },
              "mode": {
                "const": "image_to_video"
              },
              "image": {
                "type": "string",
                "description": "HTTPS image URL or PNG/JPEG/WebP data URI; no local paths"
              },
              "first_frame_image": {
                "type": "string",
                "description": "HTTPS image URL or PNG/JPEG/WebP data URI; no local paths"
              },
              "first_frame": {
                "type": "string",
                "description": "HTTPS image URL or PNG/JPEG/WebP data URI; no local paths"
              }
            },
            "allOf": [
              {
                "anyOf": [
                  {
                    "required": [
                      "image"
                    ]
                  },
                  {
                    "required": [
                      "first_frame_image"
                    ]
                  },
                  {
                    "required": [
                      "first_frame"
                    ]
                  }
                ]
              }
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "model",
              "mode",
              "prompt"
            ],
            "properties": {
              "model": {
                "enum": [
                  "seedance-2.0",
                  "seedance",
                  "qwenwork/seedance-2.0",
                  "sd2.0"
                ]
              },
              "prompt": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2500
              },
              "resolution": {
                "enum": [
                  "480p",
                  "720p",
                  "1080p",
                  "4k"
                ]
              },
              "seed": {
                "type": "integer",
                "minimum": -1,
                "maximum": 4294967295
              },
              "duration": {
                "type": "integer",
                "minimum": 4,
                "maximum": 15
              },
              "duration_seconds": {
                "type": "integer",
                "minimum": 4,
                "maximum": 15
              },
              "seconds": {
                "type": "integer",
                "minimum": 4,
                "maximum": 15
              },
              "aspect_ratio": {
                "enum": [
                  "16:9",
                  "4:3",
                  "1:1",
                  "3:4",
                  "9:16",
                  "21:9",
                  "adaptive"
                ]
              },
              "ratio": {
                "enum": [
                  "16:9",
                  "4:3",
                  "1:1",
                  "3:4",
                  "9:16",
                  "21:9",
                  "adaptive"
                ]
              },
              "generate_audio": {
                "type": "boolean"
              },
              "audio": {
                "type": "boolean"
              },
              "mode": {
                "const": "first_last_frame_to_video"
              },
              "image": {
                "type": "string",
                "description": "HTTPS image URL or PNG/JPEG/WebP data URI; no local paths"
              },
              "first_frame_image": {
                "type": "string",
                "description": "HTTPS image URL or PNG/JPEG/WebP data URI; no local paths"
              },
              "first_frame": {
                "type": "string",
                "description": "HTTPS image URL or PNG/JPEG/WebP data URI; no local paths"
              },
              "last_frame_image": {
                "type": "string",
                "description": "HTTPS image URL or PNG/JPEG/WebP data URI; no local paths"
              },
              "last_frame": {
                "type": "string",
                "description": "HTTPS image URL or PNG/JPEG/WebP data URI; no local paths"
              },
              "last_image": {
                "type": "string",
                "description": "HTTPS image URL or PNG/JPEG/WebP data URI; no local paths"
              }
            },
            "allOf": [
              {
                "anyOf": [
                  {
                    "required": [
                      "image"
                    ]
                  },
                  {
                    "required": [
                      "first_frame_image"
                    ]
                  },
                  {
                    "required": [
                      "first_frame"
                    ]
                  }
                ]
              },
              {
                "anyOf": [
                  {
                    "required": [
                      "last_frame_image"
                    ]
                  },
                  {
                    "required": [
                      "last_frame"
                    ]
                  },
                  {
                    "required": [
                      "last_image"
                    ]
                  }
                ]
              }
            ]
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "model",
              "mode",
              "prompt"
            ],
            "properties": {
              "model": {
                "enum": [
                  "seedance-2.0",
                  "seedance",
                  "qwenwork/seedance-2.0",
                  "sd2.0"
                ]
              },
              "prompt": {
                "type": "string",
                "minLength": 1,
                "maxLength": 2500
              },
              "resolution": {
                "enum": [
                  "480p",
                  "720p",
                  "1080p",
                  "4k"
                ]
              },
              "seed": {
                "type": "integer",
                "minimum": -1,
                "maximum": 4294967295
              },
              "duration": {
                "type": "integer",
                "minimum": 4,
                "maximum": 15
              },
              "duration_seconds": {
                "type": "integer",
                "minimum": 4,
                "maximum": 15
              },
              "seconds": {
                "type": "integer",
                "minimum": 4,
                "maximum": 15
              },
              "aspect_ratio": {
                "enum": [
                  "16:9",
                  "4:3",
                  "1:1",
                  "3:4",
                  "9:16",
                  "21:9",
                  "adaptive"
                ]
              },
              "ratio": {
                "enum": [
                  "16:9",
                  "4:3",
                  "1:1",
                  "3:4",
                  "9:16",
                  "21:9",
                  "adaptive"
                ]
              },
              "generate_audio": {
                "type": "boolean"
              },
              "audio": {
                "type": "boolean"
              },
              "mode": {
                "const": "reference_images_to_video"
              },
              "images": {
                "type": "array",
                "minItems": 1,
                "maxItems": 9,
                "items": {
                  "type": "string",
                  "description": "HTTPS image URL or PNG/JPEG/WebP data URI; no local paths"
                }
              },
              "reference_images": {
                "type": "array",
                "minItems": 1,
                "maxItems": 9,
                "items": {
                  "type": "string",
                  "description": "HTTPS image URL or PNG/JPEG/WebP data URI; no local paths"
                }
              }
            },
            "allOf": [
              {
                "anyOf": [
                  {
                    "required": [
                      "images"
                    ]
                  },
                  {
                    "required": [
                      "reference_images"
                    ]
                  }
                ]
              }
            ]
          }
        ]
      },
      "VideoSubmission": {
        "oneOf": [
          {
            "allOf": [
              {
                "$ref": "#/components/schemas/VideoRequest"
              },
              {
                "properties": {
                  "model": {
                    "not": {
                      "enum": [
                        "seedance-2.0",
                        "seedance",
                        "qwenwork/seedance-2.0",
                        "sd2.0"
                      ]
                    }
                  }
                }
              }
            ]
          },
          {
            "$ref": "#/components/schemas/SeedanceRequest"
          }
        ]
      }
    }
  }
}
