ForHosting KIT · Text & AI

Generate a quiz

Turning a chapter, a training manual, or an onboarding doc into a fair quiz takes longer than writing the material itself, which is why most of it never gets tested at all. The Quiz Generator API reads source content and returns a set of questions with answers pulled from that text, built for the moment you need to check whether something was actually understood, not just read.

● StablePer request + per 1,000 words$0.003
Use it from WebAPIEmailApp soonTelegram soon

Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.

Why testing comprehension gets skipped

Course creators, HR teams running onboarding, and internal training programs all produce far more reading material than assessment material, because writing a good question is genuinely harder than writing the fact it tests — a bad question either gives away the answer in its phrasing or tests trivia instead of understanding. That asymmetry means comprehension checks are usually the first thing cut under time pressure. This endpoint exists to close that gap without asking anyone to become a professional item-writer.

From source text to a finished quiz

You POST your source material to /text/quiz, and the task runs asynchronously. Once processing finishes, a set of questions with their correct answers — grounded in the submitted text, not invented facts — arrives via webhook or a signed link. The output maps directly back to the source, so every question can be traced to the passage it came from, which matters when a quiz is going to be used to certify that someone actually learned the material.

A format older than digital learning

The question-and-answer format for checking understanding predates any software — teachers have used recitation and short-answer checks since well before the printing press, and the multiple-choice test as a standardized format dates back over a century, developed originally to test large groups of people quickly and consistently. What's changed is not the format's logic but the cost of producing it: a task that once took a teacher an evening per chapter can now run against any text you already have.

Where it sits in a learning or automation pipeline

Because the endpoint is async and billed per call, it's built for scale: an e-learning platform generates a quiz automatically every time a new lesson is published, or an HR system builds an onboarding check the moment a new policy document goes live. A failed generation is retried automatically up to three times and never billed, so running this against a full course library stays predictable in cost even at volume.

What kind of quiz to expect

Expect questions that test whether the source material was understood, with answers traceable to the text rather than external trivia — the quiz reflects exactly what you fed it, so a thin source produces a thin quiz and a thorough one produces a thorough quiz. It's a tool for checking retention of specific content, not a general knowledge test generator.

E-learning course assessments

An online course platform generates an end-of-module quiz automatically from each lesson's transcript as soon as it's published.

Employee onboarding checks

An HR team turns a new compliance policy into a short quiz new hires must pass, generated the same day the policy is finalized.

Study guides from textbooks or notes

A tutoring service converts a chapter or a student's own notes into practice questions for self-testing before an exam.

Product training for support teams

A company runs its updated product documentation through the endpoint to keep support staff quizzes current with every release.

How do I generate a quiz from my own material with this API?

POST your source text to /text/quiz; the task runs asynchronously and the questions with answers are delivered by webhook or a signed link.

Is there a free tier for the quiz generator API?

There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.

How is quiz generation priced?

$0.003 per request plus $0.0135 per 1,000 words of source material, billed only when the task completes successfully.

Are the answers guaranteed to be accurate?

Answers are grounded in the text you submit rather than invented, so accuracy depends on the quality and clarity of the source material you provide.

What format are the questions in?

The output is a structured set of questions and correct answers tied back to the source text, suitable for embedding in a quiz interface or LMS.

Can I generate quizzes from long documents like a full chapter?

Yes, pricing scales with word count, so full chapters, manuals, or transcripts all work as source material.

What happens if the quiz generation task fails?

It's retried automatically up to three times and you're never charged for a task that doesn't complete.

How and when do I receive the generated quiz?

Via a signed webhook, recommended for automated pipelines, or a signed link valid for 24 hours; source material is deleted after retention and never used for training.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/text/quiz

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.

curl -X POST https://api.kit.forhosting.com/text/quiz \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"…"}'
{
  "text": "…"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "text.quiz",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.003
Per 1,000 words$0.0135

Published price — no tokens, no invented credits. A failed task is never charged.

max_tokens20000
HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.
422task_failedThe task failed after 3 retries. You are never charged for it.

Read the full KIT documentation →