API & SDK
How the API, OpenAPI spec, and typed SDK relate.
Every route validates its request and response against shared Zod schemas. Those schemas produce an OpenAPI spec, and the typed SDK is generated from that spec — so the API, docs, and client never drift.
Browse every endpoint in the API reference, generated from the same spec. A running API also serves its own interactive reference at /docs.
Using the SDK
The generated SDK mirrors these routes with full type safety, including request payloads and response shapes.
import { createClient } from "@headless-lms/sdk"
const lms = createClient({ baseUrl, token })
const { data, error } = await lms.students.progress({
studentId,
})