Docs

Generate

Generate courses, course screens, and quizzes inside a course using Coassemble AI.

Generate a course Embed Core and above

Use this endpoint to create a full course from a prompt. It returns the created course using the same response shape as the legacy course generation endpoint.

POST/v1/headless/generate/course

Body parameters

FieldTypeRequiredDescOptions
promptstringYesThe topic or learning objective to generate a course from
audiencestringYesWho the course is for (e.g. "new hires")
familiaritystringYesHow familiar the audience is with the topic (e.g. "beginner")
tonestringYesTone of voice for the generated content (e.g. "professional")
screenCountnumberYesApproximate number of screens to generate
identifierstringYesYour stable identifier for the course owner
clientIdentifierstringNoThe client this course belongs to

Generate a course screen Embed Core and above

Use this endpoint to generate a single screen and persist it into an existing course. The generated screen is appended to the end of the course.

POST/v1/headless/generate/course/{id}/screen

Path parameters

FieldDescriptionOptions
idCourse ID to add the generated screen to

Body parameters

FieldTypeRequiredDescOptions
typestringYesScreen layout type to generatetextprocesschecklistflashcardslist
titlestring | nullNoTitle for the screen
promptstring | nullNoPrompt describing what the screen should cover
contentstring | nullNoSource content to summarise into the screen

Generate a course quiz Embed Core and above

Use this endpoint to generate a complete quiz screen, including quiz intro content and persisted questions, inside an existing course.

POST/v1/headless/generate/course/{id}/quiz

Path parameters

FieldDescriptionOptions
idCourse ID to add the generated quiz to

Body parameters

FieldTypeRequiredDescOptions
promptstring | nullNoPrompt describing what the quiz should cover
contentstring | nullNoSource content to draw questions from
questionCountnumberNoHow many questions to generate
questionTypesstring[]NoQuestion types to use (subset of: multipleChoiceImg, multipleResponse, trueFalse, writeAnswer, dropDown, matchCorresponding, matchSequence)
scoredbooleanNoWhether the quiz contributes to a pass/fail grade
passingGradenumberNoPass mark (percentage 0–100) when scored is true