{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nativeads-ai/json-schema/nativeads-ai-create-image-to-video-prompt-enhancement-request-schema.json",
  "title": "CreateImageToVideoPromptEnhancementRequest",
  "description": "Request to create an image-to-video prompt enhancement preview.",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nativeads-ai-openapi.yml#/components/schemas/CreateImageToVideoPromptEnhancementRequest",
  "type": "object",
  "required": [
    "originalPrompt",
    "aspectRatio",
    "model"
  ],
  "properties": {
    "startFrameAssetId": {
      "type": "string",
      "format": "uuid",
      "description": "ID of the start frame image asset. Required for every model except seedance-2.5-pro, which rejects it (refs-only). seedance-2.0-pro and kling-v4 need it unless referenceImageAssetIds is sent, and reject it alongside references.\n"
    },
    "endFrameAssetId": {
      "type": "string",
      "format": "uuid",
      "description": "ID of the end frame image asset. Optional. Rejected for seedance-2.5-pro, and for seedance-2.0-pro and kling-v4 when referenceImageAssetIds is sent."
    },
    "referenceImageAssetIds": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "maxItems": 30,
      "description": "Reference image asset IDs. Taken by seedance-2.5-pro, seedance-2.0-pro and kling-v4, in the order sent (seedance-2.5-pro prompts address them as @Image N). Optional (omit for none). Rejected for every other model. seedance-2.5-pro is refs-only and needs at least one reference total (images and/or videos); maxItems is its absolute ceiling, which Pro and Ultra both allow; Starter has no seedance-2.5-pro (403). seedance-2.0-pro takes up to 9 and kling-v4 up to 10, on every plan, and only without startFrameAssetId and endFrameAssetId: these two models take frames or references, never both. Each must be JPEG or PNG and an image, logo, or environment asset, 30MB or smaller (50MB for kling-v4 and kling-v3-omni-pro). For kling-v4, an image whose dimensions are recorded must also have an aspect ratio (width / height) between 0.4 and 2.5; an image with no recorded dimensions skips that check. Assets generated by NativeAds (scene_forge, environments, generative resize and the rest) report fileType as the bare category 'image' and are accepted as-is.\n"
    },
    "referenceVideoAssetIds": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "maxItems": 10,
      "description": "Reference video asset IDs for seedance-2.5-pro (@Video N order). Optional (omit for none). Rejected for every other model, seedance-2.0-pro and kling-v4 included. Video-only 2.5 jobs are allowed, but reference videos are tier-gated: only Ultra takes them, up to maxItems; Starter and Pro get 403. Must be MP4 or QuickTime, 200MB or smaller, 2 to 30 seconds each, 30 seconds combined, 23.8 to 60 FPS. Frame dimensions, when known, must satisfy BOTH of the model's rules: a pixel count (width x height) between 407696 and 8295044, and an aspect ratio (width / height) between 0.4 and 2.5. They are independent -- 1400x300 is 420000 pixels, inside the band, and is still refused on its 4.67 ratio. No separate per-side rule is enforced: satisfying both of the above confines every side to 404-4554 px. A video whose dimensions were never measured skips both checks rather than being rejected. A video with no measured duration is rejected: conflict while still processing, invalid_argument once complete without one.\n"
    },
    "intermediateFrameAssetIds": {
      "type": "array",
      "items": {
        "type": "string",
        "format": "uuid"
      },
      "minItems": 1,
      "maxItems": 8,
      "description": "Ordered intermediate frame assets for kling-v4 enhancement. Optional. Fed to the enhancer alongside start/end. Up to 8 at every length, as for generation; more is refused with 400 naming the model sent. Refused with 400 for every other model, optimized included.\n"
    },
    "originalPrompt": {
      "type": "string",
      "minLength": 1,
      "maxLength": 5000,
      "description": "The text prompt to enhance for video generation. The cap depends on the model: 5000 characters for seedance-2.5-pro, kling-v4 and kling-v3-omni-pro, and for optimized where it renders on seedance-2.5-pro (Pro and Ultra); 2500 for every other model. maxLength is the highest cap; the server enforces each model's own cap and refuses a longer prompt with 400.\n"
    },
    "aspectRatio": {
      "type": "string",
      "enum": [
        "16:9",
        "9:16",
        "1:1"
      ],
      "description": "The target aspect ratio for the video. Veo 3.1 has no square render, so on Veo 3.1 a 1:1 request is accepted and the prompt is written for 16:9."
    },
    "model": {
      "allOf": [
        {
          "$ref": "#/$defs/VideoModel"
        }
      ],
      "description": "The target video generation model."
    },
    "duration": {
      "type": "integer",
      "minimum": 1,
      "description": "Target video duration (s). Lets the enhancer fit the prompt to the video's length. Omitted means the model's default. Must be one of the model's lengths (see VideoModel), or the request is refused with 400."
    },
    "enableAudio": {
      "type": "boolean",
      "default": false,
      "description": "Whether audio is enabled -- controls audio guidance in prompt enhancement. Defaults to false."
    },
    "useBrandDna": {
      "type": "boolean",
      "default": false,
      "description": "Whether to apply Brand DNA to prompt enhancement. Defaults to false. FE sends explicitly based on Brand DNA toggle state."
    }
  },
  "$defs": {
    "VideoModel": {
      "type": "string",
      "enum": [
        "veo-3.1",
        "veo-3.1-fast",
        "kling-v3-pro",
        "kling-v3-omni-pro",
        "kling-v4",
        "grok-imagine-video",
        "seedance-1.5-pro",
        "seedance-2.0-pro",
        "seedance-2.5-pro",
        "pixverse-v6",
        "optimized"
      ],
      "description": "The AI model to use for video generation.\nA new video (generate, extend, or a prompt enhancement) accepts only these, each with\nexactly the lengths listed, in seconds. Any other model or length is refused with 400.\n- optimized: renders on the plan's default model, today seedance-2.0-pro on Starter and\n  seedance-2.5-pro on Pro and Ultra, and takes that model's inputs, lengths and price. On Pro\n  it takes at most 15 reference images. It takes no intermediate frames. Responses keep\n  showing optimized.\n- seedance-2.5-pro: Seedance 2.5 Pro (refs-only). 6, 8, 10, 15, 20 or 30, within the plan's\n  Seedance 2.5 limits: not on Starter, up to 15 on Pro, up to 30 on Ultra.\n- seedance-2.0-pro: Seedance 2.0 Pro (default). A start frame (optional end frame) or up to 9 reference images. 6, 8, 10, 12 or 15.\n- kling-v4: Kling 4.0. A start frame (optional end frame, 0 to 8 intermediate frames at every\n  length) or up to 10 reference images. 6, 8, 10, 12, 15, 20 or 30, each in one call, with or\n  without intermediate frames. With intermediate frames it takes exactly one prompt.\n- kling-v3-omni-pro: the old Kling id, which videos made on Kling 3.0 keep. Still accepted: a\n  new video sent with it is made on Kling 4.0 with kling-v4's rules and keeps the id it was\n  sent with. Extending a group with this id is refused with 400; make a kling-v4 video instead.\n- veo-3.1: Google Veo 3.1. 6 or 8.\n- grok-imagine-video: Grok Imagine Video. 6, 8, 10, 12 or 15.\nLegacy, read-only. These name videos made before; a new video on one is refused with 400.\n- veo-3.1-fast: Google Veo 3.1 Fast\n- kling-v3-pro: Kling V3 Pro\n- seedance-1.5-pro: Seedance 1.5 Pro\n- pixverse-v6: PixVerse V6\n"
    }
  }
}