Skip to main content
POST
Generate Quiz

Authentication

This endpoint requires educator authentication. Include the authorization token in your request headers.

Request Body

string
required
The unique identifier of the course
string
required
The unique identifier of the chapter within the course

Response

boolean
Indicates whether the quiz generation was successful
object
The generated quiz object
string
Error message if success is false

Code Examples

Response Example

Error Responses

Notes

  • The endpoint uses AI to generate 10 multiple-choice questions based on the chapter’s lectures
  • If a quiz already exists for the chapter, it will be replaced with the newly generated one
  • Questions are designed to test conceptual understanding of the chapter topics
  • Each question has exactly 4 options with one correct answer
  • The quiz generation process analyzes all lecture titles within the chapter to create relevant questions