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

NameInTypeRequiredDescription
titlebodystringYesThe quiz's own title.
descriptionbodystringNo—
num_questionsbodyintegerNoDefaults to 10 if omitted. Capped at the teacher's tier quiz_question_count limit (unlimited for Managers).
instructionsbodystringNo—
year_levelbodystringNo—
difficultybodystringNoEasy, Medium, or Hard.
points_per_questionbodyintegerNo—
include_explanationsbodybooleanNoDefaults to true.
restricted_typesbodyarrayNoIf 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_filenamebodystringNo—
document_content_base64bodystringNoBase64-encoded file content - PDF, HTML, Markdown, or plain text only.

Responses

StatusMeaning
200Successful response - {"questions": [...]} in the same shape as the manual question-upload JSON format.
400Missing title, or an unreadable document.
402Teacher does not have the required tier.
500AI generation failed.