{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/quiz-video/json-schema/quiz-video-create-quiz-request-schema.json",
  "title": "CreateQuizRequest",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/quiz-video-openapi.json#/components/schemas/CreateQuizRequest",
  "type": "object",
  "required": [
    "title"
  ],
  "properties": {
    "title": {
      "type": "string",
      "minLength": 1
    },
    "description": {
      "type": "string"
    },
    "videoLanguage": {
      "type": "string",
      "default": "en-US",
      "description": "Language the quiz is written in. Sets narration and the language and text direction of the play page."
    },
    "format": {
      "type": "string",
      "default": "tiktok"
    },
    "quizType": {
      "type": "string",
      "default": "multiple_choice"
    },
    "template": {
      "type": "string",
      "default": "neon"
    },
    "countdownSeconds": {
      "type": "integer",
      "default": 5
    },
    "difficulty": {
      "type": "string"
    },
    "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",
      "description": "Natural-language prompt used to generate and save a custom visual theme."
    },
    "themeCustomization": {
      "$ref": "#/$defs/ThemeCustomization"
    },
    "questions": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/QuestionInput"
      }
    }
  },
  "$defs": {
    "AnswerInput": {
      "type": "object",
      "required": [
        "answerText"
      ],
      "properties": {
        "answerText": {
          "type": "string"
        },
        "isCorrect": {
          "type": "boolean",
          "default": false
        },
        "additionalInfo": {
          "type": "string"
        },
        "ttsText": {
          "type": "string"
        },
        "order": {
          "type": "integer"
        }
      }
    },
    "QuestionImageInput": {
      "type": "object",
      "required": [
        "url"
      ],
      "properties": {
        "url": {
          "type": "string",
          "format": "uri"
        },
        "alt": {
          "type": "string"
        },
        "source": {
          "type": "string",
          "default": "upload"
        },
        "sourceUrl": {
          "type": "string",
          "format": "uri"
        },
        "width": {
          "type": "integer"
        },
        "height": {
          "type": "integer"
        }
      }
    },
    "QuestionInput": {
      "type": "object",
      "required": [
        "questionText"
      ],
      "properties": {
        "questionText": {
          "type": "string"
        },
        "ttsText": {
          "type": "string"
        },
        "imagePath": {
          "type": "string"
        },
        "order": {
          "type": "integer"
        },
        "duration": {
          "type": "number",
          "default": 4
        },
        "answers": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AnswerInput"
          }
        },
        "images": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/QuestionImageInput"
          }
        }
      }
    },
    "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
    }
  }
}