{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/viewmax-studio/json-schema/viewmax-studio-create-video-request-schema.json",
  "title": "CreateVideoRequest",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/viewmax-studio-openapi.json#/components/schemas/CreateVideoRequest",
  "type": "object",
  "required": [
    "model",
    "prompt"
  ],
  "properties": {
    "model": {
      "type": "string",
      "description": "Model id from GET /api/v1/models. Offline models return 400 `video model temporarily unavailable: <id>. ...`."
    },
    "prompt": {
      "type": "string",
      "minLength": 1,
      "description": "Trimmed. At most the model's `max_prompt_length` characters when the catalog lists one (`minimax-h3`: 7000)."
    },
    "mode": {
      "type": "string",
      "enum": [
        "text-to-video",
        "image-to-video",
        "video-to-video",
        "frames-to-video",
        "reference-to-video"
      ],
      "description": "Must be a key of the model's `modes`. Default: `image-to-video` when `image_urls` is non-empty, else `video-to-video` when `video_urls` is non-empty, else `text-to-video`."
    },
    "image_urls": {
      "type": "array",
      "items": {
        "type": "string",
        "pattern": "^https?://"
      },
      "description": "http(s) URLs the provider can fetch without authentication. image-to-video: 1 (some models 2); frames-to-video: 2 (start, end); reference-to-video: 1 or more. Per-model maximums are in the docs."
    },
    "video_urls": {
      "type": "array",
      "maxItems": 1,
      "items": {
        "type": "string",
        "pattern": "^https?://"
      },
      "description": "One source video. Required for `video-to-video`; optional for `reference-to-video` on Seedance 2.0, 2.0 Fast, 2 Mini and MiniMax H3."
    },
    "options": {
      "$ref": "#/$defs/VideoOptions"
    }
  },
  "$defs": {
    "VideoOptions": {
      "type": "object",
      "additionalProperties": true,
      "description": "Values must come from the model's `modes.<mode>` in GET /api/v1/models. Omitted `duration`, `resolution` and `aspect_ratio` take `modes.<mode>.defaults` before pricing. Other keys are forwarded unvalidated.",
      "properties": {
        "duration": {
          "oneOf": [
            {
              "type": "string",
              "pattern": "^[0-9]+[sS]?$"
            },
            {
              "type": "integer",
              "minimum": 1
            }
          ],
          "description": "`\"8s\"`, `\"8\"` and `8` are equivalent."
        },
        "resolution": {
          "type": "string",
          "description": "Case-insensitive; send the catalog spelling, e.g. `720p`, `4k`, `768P`, `2K`."
        },
        "aspect_ratio": {
          "type": "string",
          "description": "Exact case, e.g. `16:9`, `Auto`."
        },
        "audio": {
          "type": "boolean",
          "description": "`true` only when `audio_toggle` is true; `false` is always accepted."
        },
        "source_video_duration_seconds": {
          "type": "number",
          "exclusiveMinimum": 0,
          "description": "Source video length. Required with `video_urls` when the mode lists `credits_per_second` (Seedance 2.x, Seedance 2.5, MiniMax H3)."
        }
      }
    }
  }
}