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
| Status | Meaning |
|---|---|
| 200 | Generation completed successfully. |
| 401 | API key missing, invalid, or revoked. |
| 402 | Insufficient credits. Recharge in the Developer Portal. |
| 413 | Uploaded file exceeds the deployment limit. |
| 422 | Invalid request or the source could not support the requested generation. |
| 429 | Abuse-protection rate limit reached. Retry later with backoff. |
| 500 | Unexpected 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.