Generate quiz questions with AI
Generates quiz questions via DeepSeek, from the quiz's own title/description plus optional source document (PDF/HTML/Markdown/ plain text), instructions, and targeting options. Teacher-gated at the same tier as manual question upload (teacher_upload_questions, premium) - Managers bypass the gate and any question-count cap. Available question types are filtered ONLY by the teacher's actual subscription tier, per type - no other type is excluded for any other reason. Output matches the same JSON s
POST
/++generate_quiz_questions_ai
Quiz Management
Authentication
Requires an authenticated (logged-in) account. Also requires a registered Integrator subscription.
This endpoint requires the calling application to be registered as an Integrator. Every call must identify the registration via a registration_id parameter (or an X-Client-Id header), and authenticate using one of the following methods, selected with the subscription_method parameter:
-
referer— The request's HTTP Referer header must match one of the domains authorized for this Integrator registration. -
ip— The request's source IP address must match one of the IP addresses authorized for this Integrator registration. -
client_token— A client token issued at registration time is supplied with the request.
Register as an Integrator and configure authorized domains, IP addresses, or a client token.
Request
Content type: application/json
| Name | In | Type | Required | Description |
|---|---|---|---|---|
title | body | string | Yes | The quiz's own title. |
description | body | string | No | — |
num_questions | body | integer | No | Defaults to 10 if omitted. Capped at the teacher's tier quiz_question_count limit (unlimited for Managers). |
instructions | body | string | No | — |
year_level | body | string | No | — |
difficulty | body | string | No | Easy, Medium, or Hard. |
points_per_question | body | integer | No | — |
include_explanations | body | boolean | No | Defaults to true. |
restricted_types | body | array | No | If provided, only these question types are used (still subject to the teacher's tier eligibility) - "let AI decide" (the default) is expressed by omitting this field entirely. |
document_filename | body | string | No | — |
document_content_base64 | body | string | No | Base64-encoded file content - PDF, HTML, Markdown, or plain text only. |
Responses
| Status | Meaning |
|---|---|
200 | Successful response - {"questions": [...]} in the same shape as the manual question-upload JSON format. |
400 | Missing title, or an unreadable document. |
402 | Teacher does not have the required tier. |
500 | AI generation failed. |
