{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/slideforge-dev/json-schema/slideforge-dev-deck-request-schema.json",
  "title": "DeckRequest",
  "description": "POST /v1/deck request body.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/slideforge-dev-deck-api-openapi.yml#/components/schemas/DeckRequest",
  "properties": {
    "slides": {
      "items": {
        "$ref": "#/$defs/SlideSpec"
      },
      "type": "array",
      "title": "Slides",
      "default": []
    },
    "prompt": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Prompt"
    },
    "slide_count": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Slide Count"
    },
    "audience": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Audience"
    },
    "focus_area": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Focus Area"
    },
    "visual_style": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Visual Style"
    },
    "theme_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Theme Id"
    },
    "mode": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Mode"
    },
    "enrich": {
      "type": "boolean",
      "title": "Enrich",
      "default": false
    },
    "chrome": {
      "anyOf": [
        {
          "$ref": "#/$defs/Chrome"
        },
        {
          "type": "null"
        }
      ]
    },
    "language": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Language"
    },
    "name": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Name"
    },
    "title": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Title"
    },
    "author": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Author"
    },
    "model": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Model"
    },
    "max_parallel": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Max Parallel"
    }
  },
  "type": "object",
  "$defs": {
    "Chrome": {
      "properties": {
        "title": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Title"
        },
        "subtitle": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Subtitle"
        },
        "kicker": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Kicker"
        },
        "footer": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Footer"
        },
        "source": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Source"
        },
        "page_number": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Page Number"
        },
        "classification": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Classification"
        }
      },
      "type": "object",
      "title": "Chrome",
      "description": "Slide chrome — the frame rendered by render_chrome().\n\nAll fields optional. Resolution order:\n1. Explicit chrome on request (highest priority)\n2. LLM-extracted chrome from brief\n3. Deck-level chrome defaults\n4. Theme chrome defaults\n5. Not rendered (if still None)"
    },
    "GenerateSpec": {
      "properties": {
        "brief": {
          "type": "string",
          "title": "Brief"
        },
        "chrome": {
          "anyOf": [
            {
              "$ref": "#/$defs/Chrome"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        }
      },
      "type": "object",
      "required": [
        "brief"
      ],
      "title": "GenerateSpec",
      "description": "Per-slide brief config within a deck (new explicit format)."
    },
    "SlideSpec": {
      "properties": {
        "generate": {
          "anyOf": [
            {
              "$ref": "#/$defs/GenerateSpec"
            },
            {
              "type": "null"
            }
          ]
        },
        "brief": {
          "type": "string",
          "title": "Brief",
          "default": ""
        },
        "chrome": {
          "anyOf": [
            {
              "$ref": "#/$defs/Chrome"
            },
            {
              "type": "null"
            }
          ]
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name"
        },
        "slide_number": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Slide Number"
        }
      },
      "type": "object",
      "title": "SlideSpec",
      "description": "One slide within a deck request."
    }
  }
}