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/courseBody parameters
| Field | Type | Required | Desc | Options |
|---|---|---|---|---|
prompt | string | Yes | The topic or learning objective to generate a course from | — |
audience | string | Yes | Who the course is for (e.g. "new hires") | — |
familiarity | string | Yes | How familiar the audience is with the topic (e.g. "beginner") | — |
tone | string | Yes | Tone of voice for the generated content (e.g. "professional") | — |
screenCount | number | Yes | Approximate number of screens to generate | — |
identifier | string | Yes | Your stable identifier for the course owner | — |
clientIdentifier | string | No | The 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}/screenPath parameters
| Field | Description | Options |
|---|---|---|
id | Course ID to add the generated screen to | — |
Body parameters
| Field | Type | Required | Desc | Options |
|---|---|---|---|---|
type | string | Yes | Screen layout type to generate | textprocesschecklistflashcardslist |
title | string | null | No | Title for the screen | — |
prompt | string | null | No | Prompt describing what the screen should cover | — |
content | string | null | No | Source 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}/quizPath parameters
| Field | Description | Options |
|---|---|---|
id | Course ID to add the generated quiz to | — |
Body parameters
| Field | Type | Required | Desc | Options |
|---|---|---|---|---|
prompt | string | null | No | Prompt describing what the quiz should cover | — |
content | string | null | No | Source content to draw questions from | — |
questionCount | number | No | How many questions to generate | — |
questionTypes | string[] | No | Question types to use (subset of: multipleChoiceImg, multipleResponse, trueFalse, writeAnswer, dropDown, matchCorresponding, matchSequence) | — |
scored | boolean | No | Whether the quiz contributes to a pass/fail grade | — |
passingGrade | number | No | Pass mark (percentage 0–100) when scored is true | — |