Generate a quiz with AI
quiz_video_generate_quizAI-generate and save a quiz from a topic. Prefer providing themeDescription or themeCustomization; when omitted, the server derives and saves a topic-based custom theme. Omit backgroundMusicId to use default YouTube-safe shared background music, or set null for silent. The response data includes visibility, playable and playUrl (where people take the quiz in a browser) when the quiz is shareable, plus watchUrl when it is public. If playable is false, call quiz_video_share_quiz to get a link. When autoRender is true, data.render also contains the queued render session so the agent can poll quiz_video_get_render for the MP4.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"topic": "<topic>"
},
"name": "quiz_video_generate_quiz"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic | Yes | Subject the AI should build the quiz around. Can be a short topic or a detailed multi-paragraph brief (up to 20,000 characters). | |
| format | No | Output aspect ratio. Defaults to "tiktok". | |
| language | No | 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. | |
| quizType | No | Quiz mechanic to generate. | |
| template | No | Visual template id. If omitted, the saved custom theme can suggest a matching template. | |
| autoRender | No | If true, immediately queue a video render for the new quiz. The render session (sessionId, status) is returned under `data.render`; poll quiz_video_get_render with that sessionId for progress and the final videoUrl. Rendering typically takes 1-5 minutes. Quiz creation is not blocked by render-queue failures — the quiz is returned either way. | |
| difficulty | No | Target difficulty level. | |
| musicVolume | No | Background music volume from 0 (silent) to 1 (full). Default 0.15. | |
| extraDirection | No | Additional instructions to steer the AI (tone, focus areas, exclusions). Up to 20,000 characters. | |
| countdownSeconds | No | Seconds of countdown shown before each question (3-15). | |
| progressBarStyle | No | Countdown progress indicator style. | |
| themeDescription | No | Natural-language custom visual theme prompt. Example: "golden luxury game show", "ocean glass", or "cyber neon". | |
| answerOptionCount | No | For multiple-choice quizzes, generate 3 or 4 answer options per question. Defaults to 4. | |
| backgroundMusicId | No | Background music track id from /api/v1/music. Omit to use the default YouTube-safe shared track; set null for silent. | |
| numberOfQuestions | No | How many questions to generate (1–200). | |
| themeCustomization | No | Explicit custom theme to save and apply to the generated quiz. Use themeDescription for prompt-style themes. |