{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quiz-video/json-schema/quiz-video-generate-quiz-request-schema.json",
  "title": "GenerateQuizRequest",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quiz-video-openapi.json#/components/schemas/GenerateQuizRequest",
  "type": "object",
  "required": [
    "topic"
  ],
  "properties": {
    "language": {
      "type": "string",
      "description": "Language to write the quiz in, e.g. \"es\" or \"ar\". Optional: without it the quiz follows the language of the topic, or English if that is unclear."
    },
    "topic": {
      "type": "string",
      "minLength": 1,
      "maxLength": 20000,
      "description": "Short topic or detailed brief (up to 20,000 characters)."
    },
    "extraDirection": {
      "type": "string",
      "maxLength": 20000
    },
    "numberOfQuestions": {
      "type": "integer",
      "minimum": 1,
      "maximum": 200,
      "default": 5
    },
    "answerOptionCount": {
      "type": "integer",
      "enum": [
        3,
        4
      ],
      "default": 4
    },
    "difficulty": {
      "type": "string",
      "enum": [
        "easy",
        "medium",
        "hard",
        "rising"
      ],
      "default": "medium"
    },
    "quizType": {
      "type": "string",
      "enum": [
        "multiple_choice",
        "reveal_answer",
        "picture_guess"
      ],
      "default": "multiple_choice"
    },
    "format": {
      "type": "string",
      "enum": [
        "tiktok",
        "youtube"
      ],
      "default": "tiktok"
    },
    "countdownSeconds": {
      "type": "integer",
      "minimum": 3,
      "maximum": 15,
      "default": 5
    },
    "template": {
      "type": "string"
    },
    "progressBarStyle": {
      "type": "string",
      "enum": [
        "circle",
        "line"
      ],
      "default": "circle"
    },
    "backgroundMusicId": {
      "type": [
        "integer",
        "null"
      ],
      "description": "Omit to use the default YouTube-safe shared track; set null for silent."
    },
    "musicVolume": {
      "type": "number",
      "default": 0.15
    },
    "themeDescription": {
      "type": "string",
      "maxLength": 20000,
      "description": "Natural-language prompt used to generate and save a custom visual theme."
    },
    "themeCustomization": {
      "$ref": "#/$defs/ThemeCustomization"
    }
  },
  "$defs": {
    "ThemeCustomization": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "description": {
          "type": "string"
        },
        "accentColorOverride": {
          "type": "string",
          "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
        },
        "backgroundColorOverride": {
          "type": "string",
          "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
        },
        "secondaryColorOverride": {
          "type": "string",
          "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
        },
        "textColorOverride": {
          "type": "string",
          "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
        },
        "answerTextColorOverride": {
          "type": "string",
          "pattern": "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$"
        },
        "fontFamilyOverride": {
          "type": "string",
          "enum": [
            "Inter",
            "Poppins",
            "Roboto",
            "Montserrat",
            "Open Sans",
            "Lato",
            "Raleway",
            "Source Sans 3",
            "Space Grotesk",
            "Manrope",
            "Work Sans",
            "DM Sans",
            "Lexend",
            "Nunito",
            "Quicksand",
            "Outfit",
            "Sora",
            "Albert Sans",
            "Bricolage Grotesque",
            "Playfair Display",
            "Merriweather",
            "Cormorant Garamond",
            "Fraunces",
            "Crimson Pro",
            "Cinzel",
            "Oswald",
            "Bebas Neue",
            "Anton",
            "Archivo Black",
            "Big Shoulders",
            "Bungee",
            "Bangers",
            "Lilita One",
            "Fredoka",
            "Baloo 2",
            "Exo 2",
            "Orbitron",
            "Press Start 2P",
            "Caveat",
            "Dancing Script",
            "Pacifico",
            "Permanent Marker",
            "Noto Sans",
            "Noto Naskh Arabic",
            "Vazirmatn"
          ]
        }
      },
      "additionalProperties": false
    }
  }
}