API usage

Usage, responses, and errors

Successful generation returns JSON containing the generated questions, source metadata, API request ID, and billing information.

Important response codes

StatusMeaning
200Generation completed successfully.
401API key missing, invalid, or revoked.
402Insufficient credits. Recharge in the Developer Portal.
413Uploaded file exceeds the deployment limit.
422Invalid request or the source could not support the requested generation.
429Abuse-protection rate limit reached. Retry later with backoff.
500Unexpected server/generation failure. Do not assume credits were charged; check account/usage.

Request IDs

Every response includes X-Request-ID. Error bodies also include a request ID. Include it when contacting support.

Credit behavior

The API reserves the requested question credits before generation. If the generation fails, the reservation is refunded. Successful generation consumes one credit per requested/generated question.

Beta quality

KleeQuiz AI is source-grounded, but output can still be wrong, repetitive, malformed, or pedagogically weak. Validate high-stakes content and keep the original source available to your users.