Developer documentation

Credits, quotas, and limits

Predict request cost and interpret the correct usage headers for your plan.

Audience
Developers and partner administrators
Before you start
An API key and knowledge of whether your account is prepaid or contracted

How usage is calculated

Each completed generation consumes one credit per generated exercise (answer included). Counts are summed across all entries.

Credit cost examples
Problems requestedCredits
55
2020
5050
  • GET /catalog is free, although it requires a valid key.
  • JSON, PDF, LaTeX, and embed creation use the same calculation.
  • Embed views are free.
  • A request that fails during validation, generation, rendering, or minting consumes no credit or quota.

Headers by plan

Header units by plan type
PlanSuccess headersUnit
Prepaid creditsX-RateLimit-Limit
X-RateLimit-Remaining
Credits; limit is the balance before the request and remaining is the post-request balance
Contracted monthly quotaX-RateLimit-Limit
X-RateLimit-Remaining
X-RateLimit-Reset
Problems; reset is seconds until the next UTC month
Metered, negotiated onlyX-Usage-Accrued-Cents
X-Usage-Cap-Cents
X-Usage-Warning
Accrued cents and an optional cap

Request limits

  • Each entry must request an integer from 1 through 30 problems.
  • The sum across all entries cannot exceed 150 problems.
  • difficulty must be easy, medium, or hard and be available for the chosen topic.
  • An embed accepts at most 20 allowed domains and a title up to 128 characters.
  • A per-key burst limiter applies. When triggered, the 429 includes Retry-After; do not assume a fixed global rate across deployments.

When capacity is exhausted

A prepaid account receives 402 insufficient_credits until credits are purchased or granted. An exhausted monthly quota receives 429 quota_exceeded plus Retry-After until the next UTC month. Do not retry these automatically.