POST /
Batch Create Quizzes
Generate multiple quizzes in one request envelope. This route is designed for scenarios where you need several quiz variants or per-learner quiz generation in one call.
POST
https://api.vidbyte.pro/ api/ v1/ quizzes/ batch_create
Example request
bash
curl https://api.vidbyte.pro/api/v1/quizzes/batch_create \
-H "x-api-key: vb_live_your_api_key" \
-H "Idempotency-Key: quiz-batch-001" \
-H "Content-Type: application/json" \
-d '{
"items": [
{ "prompt": "HTTP caching", "quiz_type": "multiple_choice" },
{ "prompt": "HTTP caching", "quiz_type": "open_ended" }
]
}'Example response
JSON
{
"success": true,
"message": "Quiz batch processed.",
"data": [
{
"index": 0,
"success": true,
"id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d",
"data": { "encrypted_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "title": "HTTP caching mastery check", "quiz_type": "multiple_choice" },
"token_stats": { "input_tokens": 655, "output_tokens": 560, "total_tokens": 1215 },
"pricing": { "total_cost": 0.0194 }
},
{
"index": 1,
"success": true,
"id": "1c6f8e2a-5d4b-4c3e-8f7a-6b5d4c3e2f1a",
"data": { "encrypted_id": "1c6f8e2a-5d4b-4c3e-8f7a-6b5d4c3e2f1a", "title": "HTTP caching reflection prompts", "quiz_type": "open_ended" },
"token_stats": { "input_tokens": 656, "output_tokens": 564, "total_tokens": 1220 },
"pricing": { "total_cost": 0.0195 }
}
],
"token_stats": { "input_tokens": 1311, "output_tokens": 1124, "total_tokens": 2435 },
"pricing": { "total_cost": 0.0389 },
"object": "quiz"
}Parameter information
These are the public parameters for /api/v1/quizzes/batch_create. Path, query, and request-body parameters are shown together so the page stays focused on the live request contract you actually send.
itemsobject[]Required
Array of 1 to 15 quiz create requests. Each item may use only prompt, content, quiz_type (or question_types), reasoning_lens, and context; any other key in any item fails the whole batch with 400 Invalid Field.