{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/spritecook-ai/json-schema/spritecook-ai-api-tileset-generate-request-schema.json",
  "title": "ApiTilesetGenerateRequest",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/spritecook-ai-openapi.json#/components/schemas/ApiTilesetGenerateRequest",
  "properties": {
    "prompt": {
      "type": "string",
      "maxLength": 5000,
      "minLength": 1,
      "title": "Prompt",
      "description": "What tileset to generate, e.g. 'mossy dungeon floor'"
    },
    "style_mode": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "pixel",
            "detailed"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Style Mode",
      "description": "pixel for pixel art tilesets, detailed for HD/game-art tilesets"
    },
    "perspective": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "topdown",
            "platformer",
            "isometric"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Perspective",
      "description": "Tileset perspective"
    },
    "piece_set": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "15-piece",
            "17-piece-base",
            "autotile-16-set",
            "isometric-3x5-32",
            "isometric-2x4-64"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Piece Set",
      "description": "Tileset layout"
    },
    "tile_size": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 512.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Tile Size",
      "description": "Final tile size in pixels"
    },
    "elevation": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "no-elevation",
            "minimal"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Elevation",
      "description": "Top-down elevation style when supported"
    },
    "edges": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "transparent",
            "two_surfaces"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Edges",
      "description": "transparent for terrain-to-alpha, two_surfaces for terrain A to terrain B where supported",
      "default": "transparent"
    },
    "variations": {
      "type": "integer",
      "maximum": 4.0,
      "minimum": 1.0,
      "title": "Variations",
      "description": "Number of tileset variations to generate",
      "default": 1
    },
    "project_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Project Id",
      "description": "Assign generated tilesets to a project"
    },
    "theme": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Theme",
      "description": "Optional theme context"
    },
    "style": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 500
        },
        {
          "type": "null"
        }
      ],
      "title": "Style",
      "description": "Optional style direction"
    },
    "model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model",
      "description": "Optional AI model override. Defaults to the tileset registry model."
    },
    "colors": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array",
          "maxItems": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Colors",
      "description": "Color palette guidance, list of hex codes (max 64)"
    },
    "force_enabled": {
      "type": "boolean",
      "title": "Force Enabled",
      "description": "Force the output palette toward force_colors",
      "default": false
    },
    "force_colors": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array",
          "maxItems": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Force Colors",
      "description": "Palette colors to force, list of hex codes (max 64)"
    },
    "force_automatic": {
      "type": "boolean",
      "title": "Force Automatic",
      "description": "When true, infer a constrained palette size automatically",
      "default": false
    },
    "force_color_count": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 64.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Force Color Count",
      "description": "Forced palette color count"
    },
    "reference_asset_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Reference Asset Id",
      "description": "Existing tileset asset to use as a source/reference. Settings are inherited from this asset."
    },
    "edit_asset_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Edit Asset Id",
      "description": "Existing tileset asset to edit. Settings are inherited from this asset."
    },
    "style_asset_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Style Asset Id",
      "description": "Existing asset to use as visual style guide only"
    }
  },
  "type": "object",
  "required": [
    "prompt"
  ]
}