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"}
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",});