Developer documentation

API reference

Choose the correct v1 operation, request fields, response type, and machine-readable contract.

Audience
All API integrators
Before you start
A server-side API key; call the catalog before constructing generation entries

v1 operations

Public API operations
OperationSuccessOutputUsage
GET /api/public/v1/catalog200Direct JSON array of grades and topicsFree
POST /api/public/v1/worksheets200application/json1 credit per exercise
POST /api/public/v1/worksheets/pdf200application/pdf1 credit per exercise
POST /api/public/v1/worksheets/latex200JSON with data.latex1 credit per exercise
POST /api/public/v1/embeds201JSON with embedId and embedUrl1 credit per exercise; free views

Common generation fields

Generation body fields
FieldRequirementBehavior
entriesRequiredNon-empty array; at most 150 total problems
entries[].idStringCaller-selected and echoed in order. Use unique values; duplicate ids are outside the supported contract.
grade / topicCatalog idsThe topic must have implemented: true
difficultyeasy | medium | hardMust be listed in difficulties for the topic
countInteger 1–30Exact problem count for that entry
localeen | esOptional; defaults to en. An unrecognized value currently also falls back to en, but do not depend on that tolerance.
seedOptional integerThe same seed + entries + locale reproduces prompts and answers; problem UUIDs may change.

Response shapes

  • The catalog returns its array directly; it is not wrapped in data.
  • JSON, LaTeX, and embeds return { data: ... }.
  • PDF returns application/pdf bytes with Content-Disposition: attachment.
  • Handled errors return { error: { code, message } }. An unhandled infrastructure failure may return a generic 5xx response; do not parse message as a stable identifier.

Contracts and tools

The OpenAPI file is the machine-readable source for routes, schemas, statuses, and headers. The Postman collection exercises the same operations. Download them rather than copying a version of this page.

mock-partner is a dependency-free console that keeps the key in a Node server and lets you exercise all five operations and their headers.