Rebuild chosen slides of a video lesson

Rebuilds the chapters named in slideIndexes after their speech was edited, and keeps every other slide as it is. The body is the build's plus slideIndexes. Every chapter outside slideIndexes must still match its slide's speech exactly; a changed chapter count needs a whole build instead.

Answers 202 with a task id. The outcome arrives on callbackUrl as lesson.recomposed (with the whole video's slides) or lesson.recompose-failed, each also carrying the request's slideIndexes, signed as for a build. A design is checked as for a build and applies to the rebuilt slides only, so send the course's current one: a logo added to a rebuilt slide in Elai's own brand kit is not kept.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
curl -X POST 'https://apis.elai.io/api/v1/videos/66a1f0c2b7cd13032a9c6002/assistant/lesson/rebuild' \
  -H 'Authorization: Bearer YOUR_API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "chapters": [
    {
      "speech": "In this video you will learn how to spot a phishing message."
    },
    {
      "speech": "What is phishing? A message that pretends to come from someone you trust."
    }
  ],
  "slideIndexes": [
    1
  ],
  "templateId": "6ab669a59baed24c0ea808a6",
  "lesson": {
    "title": "Spotting phishing"
  },
  "course": {
    "title": "Phishing awareness",
    "language": "en-US"
  },
  "callbackUrl": "https://example.com/webhooks/elai/lesson"
}'
Path Params
string
required

Video id (24-char hex ObjectId).

Body Params
chapters
array of objects
required
length between 1 and 50
chapters*
string
required
length between 1 and 20000
bullets
array of strings
length between 0 and 5
bullets
string
length between 1 and 120
image
object
string
length ≥ 1
string
length ≥ 1
lesson
object
required
course
object
required
uri
required
design
object
slideIndexes
array of integers
required
length between 1 and 50
slideIndexes*
Responses

callbackUrl.

code says how.

templateRevision or the design's, is not one of the template's this environment holds (code: template_revision_changed), or LLM features are not available to this workspace.

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json