{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/sketchxflow-com/json-schema/sketchxflow-com-generate-html-request-schema.json",
  "title": "GenerateHtmlRequest",
  "description": "Body for /api/generate-html — Phase 1 of the HTML-first pipeline.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/sketchxflow-com-openapi.json#/components/schemas/GenerateHtmlRequest",
  "properties": {
    "model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model"
    },
    "prompt": {
      "type": "string",
      "maxLength": 30000,
      "minLength": 4,
      "title": "Prompt"
    },
    "platform": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Platform",
      "default": "web"
    },
    "inspiration_url": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 2000
        },
        {
          "type": "null"
        }
      ],
      "title": "Inspiration Url"
    },
    "use_design_research": {
      "type": "boolean",
      "title": "Use Design Research",
      "default": true
    },
    "ai_images": {
      "type": "boolean",
      "title": "Ai Images",
      "default": true
    },
    "image_model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Image Model"
    },
    "reference_rights": {
      "type": "boolean",
      "title": "Reference Rights",
      "default": false
    },
    "business": {
      "anyOf": [
        {
          "$ref": "#/$defs/BusinessFacts"
        },
        {
          "type": "null"
        }
      ]
    },
    "design_reference": {
      "anyOf": [
        {
          "$ref": "#/$defs/DesignReferenceChoice"
        },
        {
          "type": "null"
        }
      ]
    },
    "style": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Style",
      "default": "auto"
    },
    "enable_3d": {
      "type": "boolean",
      "title": "Enable 3D",
      "default": false
    },
    "build_3d": {
      "type": "boolean",
      "title": "Build 3D",
      "default": false
    },
    "cinematic_hero": {
      "type": "boolean",
      "title": "Cinematic Hero",
      "default": false
    },
    "logo_id": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 64
        },
        {
          "type": "null"
        }
      ],
      "title": "Logo Id"
    },
    "taste_sections": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/TasteSection"
          },
          "type": "array",
          "maxItems": 14
        },
        {
          "type": "null"
        }
      ],
      "title": "Taste Sections"
    },
    "taste_css": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 250000
        },
        {
          "type": "null"
        }
      ],
      "title": "Taste Css"
    }
  },
  "type": "object",
  "required": [
    "prompt"
  ],
  "$defs": {
    "BusinessFacts": {
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 120,
          "title": "Name",
          "default": ""
        },
        "email": {
          "type": "string",
          "maxLength": 160,
          "title": "Email",
          "default": ""
        },
        "phone": {
          "type": "string",
          "maxLength": 60,
          "title": "Phone",
          "default": ""
        },
        "address": {
          "type": "string",
          "maxLength": 300,
          "title": "Address",
          "default": ""
        },
        "hours": {
          "type": "string",
          "maxLength": 200,
          "title": "Hours",
          "default": ""
        }
      },
      "type": "object",
      "title": "BusinessFacts",
      "description": "The real details a site shows (owner, 2026-09-29): given up front, they\nreplace the \"[Phone]\" / \"hello@[your-domain]\" placeholders a generation\notherwise leaves for the owner to fill before publishing."
    },
    "DesignReferenceChoice": {
      "properties": {
        "image_url": {
          "type": "string",
          "maxLength": 2000,
          "title": "Image Url"
        },
        "page_url": {
          "type": "string",
          "maxLength": 2000,
          "title": "Page Url",
          "default": ""
        },
        "title": {
          "type": "string",
          "maxLength": 300,
          "title": "Title",
          "default": ""
        }
      },
      "type": "object",
      "required": [
        "image_url"
      ],
      "title": "DesignReferenceChoice",
      "description": "A reference look the user picked before building (/api/design-directions)."
    },
    "TasteSection": {
      "properties": {
        "slot": {
          "type": "string",
          "maxLength": 40,
          "title": "Slot"
        },
        "id": {
          "type": "string",
          "maxLength": 80,
          "title": "Id"
        },
        "name": {
          "type": "string",
          "maxLength": 120,
          "title": "Name",
          "default": ""
        },
        "html": {
          "type": "string",
          "maxLength": 40000,
          "title": "Html"
        }
      },
      "type": "object",
      "required": [
        "slot",
        "id",
        "html"
      ],
      "title": "TasteSection"
    }
  }
}