Skip to main content
POST
/
v1
/
activities
/
generate
Generate activities
curl --request POST \
  --url https://api.example.com/v1/activities/generate \
  --header 'Content-Type: application/json' \
  --data '
{
  "lesson_id": "<string>",
  "unit_id": "<string>",
  "cohort_id": "<string>",
  "count": 123,
  "types": [
    "<string>"
  ]
}
'

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.

Body

lesson_id
string
Generate for one lesson.
unit_id
string
Generate for every lesson in a unit.
cohort_id
string
Generate for every lesson in a cohort.
count
integer
default:"5"
Activities per lesson.
types
string[]
Optional weighting. Defaults to a balanced mix: ["explain", "quiz", "flashcard", "remember"].
Exactly one of lesson_id, unit_id, or cohort_id is required.

Examples

// One lesson
await hk.activities.generate({
  lesson_id: "lsn_123",
  count: 5,
  types: ["explain", "quiz", "flashcard"],
});

// Whole cohort
await hk.activities.generate({ cohort_id: "coh_123", count: 5 });

Returns

A handle:
{
  "id": "gen_01HX9...",
  "status": "pending",
  "scope": { "cohort_id": "coh_123", "lesson_count": 12 },
  "estimated_ready_at": "2026-05-10T12:05:30Z"
}
Poll or webhook-listen for completion.