{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.sogni.ai/creative-agent/2026-09-10.1/tools/upscale_video.schema.json",
  "title": "upscale_video arguments",
  "schemaVersion": "2026-09-10.1",
  "description": "Upscale an existing video to 1080p, 1440p or 2160p (4K) with recommended RelayVSR, or to 1080p or 1440p with FlashVSR. This is promptless, deterministic enhancement, not a generative edit: it keeps every source frame, the exact frame rate, the full aspect ratio, and the original audio, and it never changes content, trims, crops, restyles, or interpolates frames. Use it when the user asks to upscale, enlarge, sharpen, or increase the resolution of an uploaded or previously generated video, or wants an HD, 1080p, 1440p, 2K, or 4K copy of it. Do not use it to create, restyle, extend, or edit a video; when the user explicitly asks a generative model such as Seedance to re-render the clip, use video_to_video. Explicitly set model to relayvsr for new upscales. Use flashvsr when the user requests FlashVSR or specifically wants its detailPreference, processingSpeed or seed controls. Omitted model retains FlashVSR for compatibility. With FlashVSR the output is at most twice the source size, so 1080p needs a source whose short edge is 540-768px and 1440p needs 720-768px, and the source can be at most about 1344x768 pixels (768x1344 in portrait). With RelayVSR the output is at most twice the source size for a source up to 1920x1088 pixels (1088x1920 in portrait), or four times for a source up to 1344x768 (768x1344 in portrait), so 2160p needs a source whose short edge is 540-768px or 1080-1088px, and the output's long edge can be at most 3840px. The source must also be 1-60 fps and at most 100 MB. The server sets the maximum clip length and rejects a source that is too long; never quote a length limit yourself, and if the tool reports that rejection, relay that error to the user. FlashVSR cannot produce 4K or any size above 1440p, so a 4K request always uses relayvsr. Nothing here produces a size above 2160p; when the user asks for one, say so and offer 2160p. Each upscale costs credits based on the source video's size and length. With FlashVSR, optional detailPreference (stable or sharper), processingSpeed (stable or faster), and seed tune the result; omit them unless the user asks, and none of them changes the price. RelayVSR refuses all three.",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "sourceVideoIndex": {
      "type": "number",
      "description": "Source video to upscale. Non-negative values select a prior generated video result by 0-based index. Negative values select uploaded videos: -1 is the first uploaded video, -2 the second, and so on. If omitted, use the latest generated video, falling back to the most recent uploaded video."
    },
    "model": {
      "type": "string",
      "enum": [
        "flashvsr",
        "relayvsr"
      ],
      "description": "Upscaler. Explicitly select relayvsr, recommended for new upscales to 1080p, 1440p or 2160p. Use flashvsr when requested or for its detailPreference, processingSpeed or seed controls; it reaches 1080p or 1440p. RelayVSR takes none of those options. Omitted model retains FlashVSR for compatibility."
    },
    "targetResolution": {
      "type": "number",
      "enum": [
        1080,
        1440,
        2160
      ],
      "description": "Output resolution of the short edge in pixels: 2160 for 2160p/4K (relayvsr only), 1440 for 1440p/2K, or 1080 for 1080p/Full HD. The long edge follows the source aspect ratio, so portrait videos stay portrait. Default: 1440, or 1080 when the source is too small for 1440p. Set 1080 when the user asks for 1080p or Full HD, and 2160 with model relayvsr when the user asks for 4K or 2160p."
    },
    "detailPreference": {
      "type": "string",
      "enum": [
        "stable",
        "sharper"
      ],
      "description": "FlashVSR only. Detail preference. stable, the default, gives the most temporally stable result. sharper renders crisper fine detail with a little more risk of shimmer between frames. Set sharper only when the user asks for a sharper, crisper, or more detailed upscale; otherwise omit it. It does not change the price."
    },
    "processingSpeed": {
      "type": "string",
      "enum": [
        "stable",
        "faster"
      ],
      "description": "FlashVSR only. Processing speed. stable, the default, gives the most stable result. faster finishes sooner with slightly less stable detail. Set faster only when the user asks for a quicker upscale; otherwise omit it. It does not change the price."
    },
    "seed": {
      "type": "integer",
      "minimum": -1,
      "maximum": 4294967295,
      "description": "FlashVSR only. Seed for the upscaler's fine texture, 0 through 4294967295; different seeds give slightly different fine detail. Omit it to keep the repeatable default of 0. Use -1 for a random seed. Set it only when the user gives a seed or asks for a different or random variation of an upscale."
    }
  },
  "required": [],
  "if": {
    "properties": {
      "model": {
        "const": "relayvsr"
      }
    },
    "required": [
      "model"
    ]
  },
  "else": {
    "properties": {
      "targetResolution": {
        "enum": [
          1080,
          1440
        ]
      }
    }
  }
}
