{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/nativeads-ai/json-schema/nativeads-ai-generated-videos-group-schema.json",
  "title": "GeneratedVideosGroup",
  "x-generated": "2026-11-19",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/nativeads-ai-openapi.yml#/components/schemas/GeneratedVideosGroup",
  "type": "object",
  "required": [
    "generatedVideosGroupId",
    "status",
    "createdAt",
    "updatedAt",
    "prompt",
    "dimension",
    "enableAudio",
    "useBrandDna",
    "model",
    "duration",
    "variations",
    "intermediateFrameAssets",
    "referenceImageAssets",
    "referenceVideoAssets"
  ],
  "properties": {
    "generatedVideosGroupId": {
      "type": "string",
      "format": "uuid",
      "description": "Unique identifier for this generated videos request group."
    },
    "sourceAsset": {
      "allOf": [
        {
          "$ref": "#/$defs/AssetSummary"
        }
      ],
      "nullable": true,
      "description": "The start-frame image asset, if one was used. Null when the group has no start frame, which is every new seedance-2.5-pro job and any seedance-2.0-pro or kling-v4 job sent with referenceImageAssetIds."
    },
    "endFrameAsset": {
      "allOf": [
        {
          "$ref": "#/$defs/AssetSummary"
        }
      ],
      "nullable": true,
      "description": "The end frame image asset, if one was used for this video group."
    },
    "intermediateFrameAssets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AssetSummary"
      },
      "description": "Ordered intermediate frame assets used for this group (Kling). Empty if none."
    },
    "referenceImageAssets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AssetSummary"
      },
      "description": "Reference image assets in the order sent, for seedance-2.5-pro, seedance-2.0-pro and Kling. Empty if none."
    },
    "referenceVideoAssets": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/AssetSummary"
      },
      "description": "Reference video assets for seedance-2.5-pro (@Video N order). Empty if none."
    },
    "status": {
      "type": "string",
      "enum": [
        "pending",
        "processing",
        "completed",
        "failed"
      ],
      "description": "Overall status of the generated videos group, derived from its variations."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the generated videos group was created."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp of the last update to the group or its variations."
    },
    "completedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Timestamp when this group was completed."
    },
    "failedAt": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Timestamp when this group failed."
    },
    "prompt": {
      "type": "string",
      "description": "The prompt used for this generation group."
    },
    "authoredPrompt": {
      "type": [
        "string",
        "null"
      ],
      "readOnly": true,
      "description": "This group's entry of the request's `authoredPrompts` (the text the caller reports\nwriting before client-side enhancement), recorded once at creation. When the request\nomitted the array, or sent this entry blank, this is a copy of the submitted prompt,\nso equal values do not prove no enhancement ran. Null on groups created before this field was recorded (NAT-1792).\n"
    },
    "dimension": {
      "$ref": "#/$defs/Dimension"
    },
    "enableAudio": {
      "type": "boolean",
      "default": false,
      "description": "Whether audio generation was enabled for this group."
    },
    "useBrandDna": {
      "type": "boolean",
      "description": "Whether Brand DNA was applied to inline prompt enhancement for this video group."
    },
    "model": {
      "$ref": "#/$defs/VideoModel"
    },
    "duration": {
      "type": "integer",
      "minimum": 1,
      "description": "Video duration in seconds for this generation group."
    },
    "resolution": {
      "allOf": [
        {
          "$ref": "#/$defs/VideoResolution"
        }
      ],
      "description": "Output resolution of this group's videos. Absent on a group created before resolution was recorded until its first extend, which records the plan's default resolution."
    },
    "variations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/GeneratedVideo"
      },
      "description": "List of all generated videos variations within this group (one per prompt)."
    },
    "error": {
      "allOf": [
        {
          "$ref": "#/$defs/Error"
        }
      ],
      "nullable": true
    }
  },
  "$defs": {
    "AssetSummary": {
      "type": "object",
      "required": [
        "assetId",
        "assetType",
        "previewUrl",
        "assetUrl"
      ],
      "properties": {
        "assetId": {
          "type": "string",
          "format": "uuid",
          "description": "The ID of the asset."
        },
        "assetType": {
          "type": "string",
          "enum": [
            "image",
            "logo",
            "video",
            "document",
            "environment",
            "font",
            "mask",
            "model",
            "text",
            "walmart_preview"
          ]
        },
        "previewUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "url",
          "description": "URL to the preview of the asset."
        },
        "assetUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "url",
          "description": "URL to the asset."
        },
        "displayUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "url",
          "description": "A screen-size rendition (2048 px long edge at most) for a full-screen viewer. Never the original file of a large image. Use the full URL only to download."
        }
      }
    },
    "Dimension": {
      "type": "object",
      "required": [
        "width",
        "height"
      ],
      "properties": {
        "width": {
          "type": "integer",
          "description": "Width of the image in pixels."
        },
        "height": {
          "type": "integer",
          "description": "Height of the image in pixels."
        }
      }
    },
    "Error": {
      "description": "Standard error response",
      "type": "object",
      "required": [
        "error",
        "requestId"
      ],
      "properties": {
        "error": {
          "$ref": "#/$defs/ErrorError"
        },
        "requestId": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier for the request, useful for tracing."
        }
      }
    },
    "ErrorError": {
      "type": "object",
      "required": [
        "code",
        "message"
      ],
      "properties": {
        "code": {
          "type": "string"
        },
        "message": {
          "type": "string"
        },
        "details": {
          "description": "Additional error context (optional, can be object or array). Absent on\nmost errors; the message is the only guaranteed human-readable field.\n\nUpload rejections populate it, because a client needs to act on the\nanswer rather than parse it. `POST /v1/assets/initiate-upload` and\n`POST /v1/assets/confirm-upload` return:\n\n- `reason` — `unsupported_declared_type` when the declared MIME type is\n  not accepted, or `unsupported_file_contents` when the uploaded bytes\n  are a different format than declared (an AVIF saved with a `.jpg`\n  name, say). Only confirm-upload can report the second: it is the\n  first point that reads the real bytes.\n- `declaredType` — the MIME type the client sent.\n- `detectedFormat` — the format the bytes actually are, on\n  `unsupported_file_contents` only.\n- `supportedFormats` — every format an upload may be.\n- `retryable` — `false` on both, meaning the same bytes will be\n  rejected again. Clients must not retry these.\n"
        }
      }
    },
    "GeneratedVideo": {
      "type": "object",
      "required": [
        "generatedVideoId",
        "status",
        "prompt",
        "width",
        "height",
        "duration",
        "enableAudio",
        "model",
        "createdAt",
        "updatedAt"
      ],
      "properties": {
        "generatedVideoId": {
          "type": "string",
          "format": "uuid",
          "description": "Unique identifier for this specific generated video variation."
        },
        "assetId": {
          "type": [
            "string",
            "null"
          ],
          "format": "uuid",
          "description": "The ID of the generated asset once the video is successfully created and stored. Null if generation is still pending or failed."
        },
        "status": {
          "type": "string",
          "enum": [
            "pending",
            "processing",
            "completed",
            "failed"
          ],
          "description": "Current status of this video generation."
        },
        "prompt": {
          "type": "string",
          "description": "The prompt as submitted. The model may have received different words; see renderedPrompt."
        },
        "renderedPrompt": {
          "type": [
            "string",
            "null"
          ],
          "description": "The exact text the video model received. It differs from prompt when the server enhanced or translated it, or pinned the Seedance 2.5 dialogue language. Absent until the video completes, and for videos generated before this field existed."
        },
        "width": {
          "type": "integer",
          "description": "Width of the generated video in pixels."
        },
        "height": {
          "type": "integer",
          "description": "Height of the generated video in pixels."
        },
        "videoUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "url",
          "description": "URL to the full-resolution generated video. Available when status is 'completed'."
        },
        "previewUrl": {
          "type": [
            "string",
            "null"
          ],
          "format": "url",
          "description": "URL to a preview thumbnail of this clip. It is a still of the output when the pipeline saved one, otherwise the start image, otherwise null. A reference image is never used, so a group with no start frame (seedance-2.5-pro, or seedance-2.0-pro and kling-v4 sent with referenceImageAssetIds) has a preview only when a still was saved. Available when status is 'completed'."
        },
        "enableAudio": {
          "type": "boolean",
          "default": false,
          "description": "Whether audio was enabled for this generated video."
        },
        "model": {
          "$ref": "#/$defs/VideoModel"
        },
        "duration": {
          "type": "integer",
          "description": "Duration of the video in seconds."
        },
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp when this variation job was created."
        },
        "updatedAt": {
          "type": "string",
          "format": "date-time",
          "description": "Timestamp of the last update (status change)."
        },
        "generatedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Timestamp when the video generation completed successfully."
        },
        "failedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "Timestamp when the video generation failed."
        },
        "error": {
          "allOf": [
            {
              "$ref": "#/$defs/Error"
            }
          ],
          "nullable": true
        }
      }
    },
    "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"
    },
    "VideoResolution": {
      "type": "string",
      "enum": [
        "720p",
        "1080p"
      ],
      "description": "Output resolution of a new video. 720p on every plan; 1080p on Pro and Ultra."
    }
  }
}