{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/masko-ai/json-schema/masko-ai-generate-all-body-schema.json",
  "title": "GenerateAllBody",
  "x-generated": "2026-11-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/masko-ai-openapi.json#/components/schemas/GenerateAllBody",
  "type": "object",
  "properties": {
    "animation_model": {
      "type": "string",
      "enum": [
        "standard"
      ],
      "description": "Animation model, as in Studio: standard (2 credits/sec, 2–15 s). Default standard."
    },
    "duration": {
      "type": "integer",
      "minimum": 2,
      "maximum": 15,
      "description": "Whole seconds within the model's range, default 5. An additional image costs 1 credit only when a source image must be generated."
    },
    "edge_settings": {
      "type": "string",
      "enum": [
        "own"
      ],
      "description": "Each edge keeps its saved quality (generationModel) and length (duration), as Studio's Generate all does; animation_model and duration apply to edges without valid ones. Part of the plan: send it to the estimate and to generate-all."
    },
    "max_credits": {
      "type": "number",
      "minimum": 0,
      "description": "Hard server-side credit ceiling. Execution fails before billing when the current work exceeds this limit."
    },
    "skip_completed": {
      "type": "boolean",
      "default": true,
      "description": "Deprecated compatibility flag. Canvas generate-all only dispatches missing work and always skips edges that already have assigned generated assets."
    },
    "include_stickers": {
      "type": "boolean",
      "default": false,
      "description": "When true, generate sticker_image derivatives for generated image nodes."
    },
    "dry_run": {
      "type": "boolean",
      "default": false,
      "description": "When true, only returns the planned work, prompts, skipped items, and estimated credit cost. Does not deduct credits, create jobs/assets/items, mutate the canvas graph, or start workflows."
    },
    "targets": {
      "type": "string",
      "enum": [
        "all",
        "images",
        "stickers",
        "animations"
      ],
      "default": "all",
      "description": "Which work to dispatch. \"images\" only generates skeleton node images. \"stickers\" backfills sticker_image derivatives for completed node images. \"animations\" only dispatches edge videos. \"all\" does both images and animations."
    },
    "node_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1,
      "maxItems": 100,
      "description": "Optional exact node selection. When present, only these nodes are considered for image or sticker work. Omit to consider every node."
    },
    "edge_ids": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      },
      "minItems": 1,
      "maxItems": 200,
      "description": "Optional exact edge selection. When present, only these edges are considered for animation work. Omit to consider every edge."
    },
    "expected_graph_hash": {
      "type": "string",
      "minLength": 1,
      "description": "Optional graph revision returned by the dry-run plan. Execution returns 409 if the canvas changed after approval."
    },
    "approved_plan_id": {
      "type": "string",
      "minLength": 1,
      "description": "Optional generation plan identity returned by dry_run. Execution returns 409 unless the current graph, scope, prompts, duration, and generation options still match that approved plan."
    }
  }
}