LEIA Docs

Batch generate slides (nano-banana)

POST
/courses/{courseId}/lessons/generate-slides

Generates illustrated slide presentations for multiple lessons using the nano-banana method. Requires a slide template.

Authorization

AuthorizationBearer <token>

LEIA API key passed as Bearer token (recommended). Keys start with leia_sk_.

In: header

Path Parameters

courseId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/courses/string/lessons/generate-slides" \  -H "Content-Type: application/json" \  -d '{    "lessonIds": [      "lesson_1",      "lesson_2"    ],    "options": {      "slideCount": 6,      "template": "whiteboard",      "language": "en"    }  }'
[
  {}
]
Empty
{
  "error": {
    "code": "UNAUTHORIZED",
    "message": "Valid LEIA API key required"
  }
}
{
  "error": {
    "code": "FORBIDDEN",
    "message": "API key service user must be a CREATOR user"
  }
}
{
  "error": {
    "code": "IDEMPOTENCY_CONFLICT",
    "message": "Idempotency-Key was reused with a different request body"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}
{
  "error": {
    "code": "string",
    "message": "string"
  }
}