Lesson drafts

One lesson or quiz written in full, ready for learners, from a title and what it should teach.

  • Price5 credits (50p) per draft
  • Typical time15 s to 2 min
  • Scopeauthoring:write
  • Runs asA background job
Try it

Run lesson drafts in the sandbox

No key and nothing to pay. The sandbox returns a realistic example in a couple of seconds; no AI runs and no data is kept.

The lesson title, for example "Calculating a notice period".
What the lesson should teach, in a sentence or two.
content: a lesson of varied blocks with quick checks. quiz: 4 to 6 multiple-choice questions.
How long the lesson should take, in minutes.
The course this lesson belongs to, for context.
The module this lesson belongs to, for context.
Who it is for, for example "GCSE (ages 14-16)" or "Workplace beginners".
Teaching text to write from (at most 10,000 words).
Also save the lesson in a new unpublished draft course in EduMark (needs the courses:write permission).
  1. Queued202 and a job id, straight away
  2. ProcessingPoll, stream or wait for a webhook
  3. SucceededResult and files on the job
Every AI request runs as a background job, so nothing times out.

A content lesson comes back as 4 to 8 varied editor blocks (an opening, key terms, tips and common mistakes, worked steps, tables and quick checks); a quiz as 4 to 6 multiple-choice questions with explanations. Add source_text or a document to ground the lesson in your material. Set save_to_lms to also save it in a new unpublished draft course in EduMark (the key needs courses:write).

Requires authoring:write. Costs 5 credits per draft. Send a unique Idempotency-Key; reuse it with the identical body when retrying. Returns 202 with a job: poll GET /jobs/{job_id}, stream GET /jobs/{job_id}/events, or use a signed webhook.

Lesson drafts

POST/v1/authoring/lessons

Scope authoring:write

Headers

Lesson drafts: headers
FieldDetails
Idempotency-KeystringRequiredA unique key per new operation; reuse it with the identical body when retrying.
EduMark-VersionenumAPI version. Defaults to the latest.One of 2026-10-21

Request body

Lesson drafts: request body
FieldDetails
titlestringRequiredThe lesson title, for example "Calculating a notice period".Up to 240 characters
focusstringWhat the lesson should teach, in a sentence or two.Up to 2,000 charactersDefault ""
kindenumcontent: a lesson of varied blocks with quick checks. quiz: 4 to 6 multiple-choice questions.One of content, quizDefault "content"
minutesintegerHow long the lesson should take, in minutes.3 to 120Default 15
course_titlestring, optionalThe course this lesson belongs to, for context.Up to 200 characters
module_titlestring, optionalThe module this lesson belongs to, for context.Up to 200 characters
levelstring, optionalWho it is for, for example "GCSE (ages 14-16)" or "Workplace beginners".Up to 240 characters
source_textstring, optionalTeaching text to write from (at most 10,000 words).Up to 120,000 characters
documentFileReference or DocumentInput, optionalA PDF, DOCX or TXT to write from: {"file_id"} or inline base64.
file_iddocument.file_idstringRequiredThe id returned by POST /v1/files, after POST /v1/files/{id}/complete reported ready.When sending FileReferencePattern ^file_[a-f0-9]{32}$
filenamedocument.filenamestringRequiredWhen sending DocumentInputUp to 200 characters
base64document.base64stringRequiredWhen sending DocumentInputUp to 27,962,028 characters
mime_typedocument.mime_typestring, optionalWhen sending DocumentInputUp to 150 characters
save_to_lmsbooleanAlso save the lesson in a new unpublished draft course in EduMark (needs the courses:write permission).Default false

Responses

StatusMeaning
202Successful Response
400Request rejected. Inspect error.code and request_id; failed work is not billed.
401Request rejected. Inspect error.code and request_id; failed work is not billed.
402Request rejected. Inspect error.code and request_id; failed work is not billed.
403Request rejected. Inspect error.code and request_id; failed work is not billed.
404Request rejected. Inspect error.code and request_id; failed work is not billed.
409Request rejected. Inspect error.code and request_id; failed work is not billed.
410Request rejected. Inspect error.code and request_id; failed work is not billed.
413Request rejected. Inspect error.code and request_id; failed work is not billed.
415Request rejected. Inspect error.code and request_id; failed work is not billed.
422Validation Error
429Request rejected. Inspect error.code and request_id; failed work is not billed.
503Request rejected. Inspect error.code and request_id; failed work is not billed.