Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.hawkings.education/llms.txt

Use this file to discover all available pages before exploring further.

1. Get an API key

Grab a key from your dashboard. Keys start with hk- and are scoped to a single workspace.
export HAWKINGS_API_KEY="hk-..."
Test keys are unmetered for the first 10,000 requests. You won’t be billed for anything you build in this guide.

2. Install the SDK

npm install @hawkings/sdk
Officially supported: Node 18+, Deno, Bun, Cloudflare Workers, Vercel Edge, PHP 8.1+. Python and Go SDKs are in private beta — join the list.

3. Make your first call

import Hawkings from "@hawkings/sdk";

const hk = new Hawkings();

const course = await hk.courses.create({
  name: "Intro to Special Relativity",
  language: "en",
  hours: 12,
});

console.log(course.id);
You should see something like:
{
  "id": "crs_01HX9N5AB3...",
  "name": "Intro to Special Relativity",
  "language": "en",
  "hours": 12,
  "status": "draft",
  "created_at": "2026-05-10T12:00:00Z"
}

4. Let the AI write the syllabus

await hk.courses.generateSyllabus(course.id, {
  brief: "An introductory undergraduate course on special relativity, " +
         "ending with the equivalence of mass and energy.",
});

// Poll until ready (≈ 30s)
const ready = await hk.poll(() => hk.courses.retrieve(course.id), {
  until: c => c.status === "ready",
});
When that resolves, your course has units, lessons, and learning objectives. You’re ready to generate activities or export to SCORM.

5. Read it back

const full = await hk.courses.retrieve(course.id, {
  expand: ["cohorts", "cohorts.lessons", "cohorts.lessons.activities"],
});
The expand option works on every retrieval. See Pagination & expanding.

What’s next

Authentication

API keys, scopes, and the difference between user keys and platform keys.

Data model

The full graph: workspaces → courses → cohorts → lessons → activities.

AI generation

How async generation works, polling vs. webhooks, and grounded research.

Errors & retries

Error taxonomy, automatic retries, and idempotency keys.