Skip to main content
POST
/
api
/
v1
/
quizzes
/
generate
Generate a quiz with AI
curl --request POST \
  --url https://quizquail.com/api/v1/quizzes/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "topic": "Ancient Roman history",
  "options": {
    "rounds": 5,
    "questionsPerRound": 10,
    "difficulty": 3,
    "questionTypes": [
      "<string>"
    ],
    "questionDurationSeconds": 16.5,
    "answerDurationSeconds": 8.5,
    "factDurationSeconds": 8.5,
    "hintTimingPercent": 50
  }
}
'
"<string>"

Authorizations

Authorization
string
header
required

API key authentication. Prefix your key with Bearer in the Authorization header.

Keys follow the format qq_... and can be scoped to specific permissions.

Body

application/json
topic
string
required

Topic for AI quiz generation

Required string length: 1 - 500
Example:

"Ancient Roman history"

options
object

Response

SSE stream of generation progress

Server-Sent Events stream