{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sprixen-com/json-schema/sprixen-com-create-vfx-dto-schema.json",
  "title": "CreateVfxDto",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sprixen-com-openapi.json#/components/schemas/CreateVfxDto",
  "type": "object",
  "properties": {
    "requestId": {
      "type": "string",
      "format": "uuid",
      "description": "Keep this UUID for identical retries to avoid duplicate charges."
    },
    "name": {
      "type": "string",
      "maxLength": 80
    },
    "preset": {
      "type": "string",
      "enum": [
        "portal",
        "aura",
        "shield",
        "burst",
        "beam",
        "hazard",
        "flame",
        "fireball",
        "firewall",
        "frost",
        "icestorm",
        "snow",
        "lightning",
        "chainlightning",
        "thunder",
        "waterwave",
        "whirlpool",
        "rain",
        "smoke",
        "fog",
        "poison",
        "acid",
        "healing",
        "blessing",
        "leaves",
        "vines",
        "runes",
        "summoning",
        "blackhole",
        "stars",
        "meteor",
        "slash",
        "claw",
        "shockwave",
        "shatter",
        "confetti"
      ],
      "description": "v1 legacy preset. Omit and use `family` for v2."
    },
    "color": {
      "type": "string"
    },
    "accent": {
      "type": "string"
    },
    "version": {
      "type": "number",
      "enum": [
        2
      ],
      "description": "Recipe version as returned by get_vfx. Accepted and ignored: `family` is what selects the v2 recipe."
    },
    "family": {
      "type": "string",
      "enum": [
        "fireball",
        "fire-bolt",
        "burning-hands",
        "flame-wall",
        "meteor",
        "torch",
        "hearth",
        "candle",
        "ray-of-frost",
        "ice-storm",
        "frost-nova",
        "lightning-bolt",
        "chain-lightning",
        "shock",
        "magic-missile",
        "shield-ward",
        "arcane-portal",
        "eldritch-blast",
        "dispel-magic",
        "cure-wounds",
        "bless-aura",
        "spirit-guardians",
        "inflict-wounds",
        "hunger-of-hadar",
        "necrotic-burst",
        "entangle",
        "thorn-whip",
        "poison-spray",
        "slash",
        "thrust",
        "hit-spark",
        "block",
        "critical-hit",
        "rain",
        "snow",
        "fog",
        "embers",
        "dust",
        "level-up",
        "coin-burst",
        "checkpoint",
        "heal-pop",
        "shield-break"
      ],
      "description": "v2 effect family slug. Presence of this field selects the v2 recipe."
    },
    "palette": {
      "description": "Explicit main/accent/glow hex. Omit to use `variant.colorName` or the family default.",
      "allOf": [
        {
          "$ref": "#/$defs/VfxPaletteDto"
        }
      ]
    },
    "fps": {
      "type": "number",
      "enum": [
        12,
        24
      ],
      "default": 24
    },
    "loop": {
      "type": "boolean",
      "description": "Overrides the family's default loop/one-shot behavior."
    },
    "variant": {
      "$ref": "#/$defs/VfxVariantDto"
    },
    "projectId": {
      "type": "string",
      "description": "Project that owns the reference sprite. Enables style lock."
    },
    "spriteId": {
      "type": "string",
      "description": "Reference sprite in that project to match the effect's look to."
    },
    "aiStyleLock": {
      "type": "boolean",
      "description": "+2 credits. Requires projectId/spriteId. Generates AI particle textures matched to the sprite; falls back to no-AI style lock and refunds on failure."
    },
    "sfx": {
      "type": "boolean",
      "description": "+1 credit. Pairs a short procedural sound effect with the export."
    },
    "elementPackId": {
      "type": "string",
      "description": "v2 only. Id of a completed AI element pack (POST /v1/vfx/elements). The family's flame/smoke/shard/petal/glyph particles are drawn with the pack's bitmaps instead of procedural shapes; motion, glows and sparks stay the family's own. No extra credits."
    },
    "intensity": {
      "type": "number",
      "minimum": 0.1,
      "maximum": 1
    },
    "seed": {
      "type": "number",
      "minimum": 0,
      "maximum": 999999
    },
    "duration": {
      "type": "number",
      "enum": [
        1,
        2,
        4
      ],
      "description": "v1 only accepts 2 or 4."
    },
    "size": {
      "type": "number",
      "enum": [
        256,
        512,
        1024
      ],
      "description": "v1 only accepts 256 or 512."
    }
  },
  "required": [
    "requestId",
    "name",
    "intensity",
    "seed",
    "duration",
    "size"
  ],
  "$defs": {
    "VfxPaletteDto": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 40,
          "description": "Palette label as listed by the family (e.g. \"Fire\"). Accepted and ignored, so a recipe from list_vfx_presets or get_vfx can be sent back as is."
        },
        "main": {
          "type": "string"
        },
        "accent": {
          "type": "string"
        },
        "glow": {
          "type": "string"
        }
      },
      "required": [
        "main",
        "accent",
        "glow"
      ]
    },
    "VfxVariantDto": {
      "type": "object",
      "properties": {
        "colorName": {
          "type": "string",
          "description": "One of the family's 4 named palettes."
        },
        "sizeName": {
          "type": "string"
        }
      }
    }
  }
}