Elai.io Quiz API
Generate and rewrite quiz questions with an LLM. Nothing is persisted — save the result onto a slide yourself.
Generate and rewrite quiz questions with an LLM. Nothing is persisted — save the result onto a slide yourself.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/elaiio:elaiio-quiz-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Elai Public Quiz API
version: '1.0'
description: 'Every endpoint below is served under `https://apis.elai.io/api/v1`.
## Authentication
Send your workspace API token as a bearer token on every request:
```
Authorization: Bearer
```
Generate and rotate the token in the Elai web app under **Settings → API**, or through
`POST /generateToken`. The token is scoped to one **workspace** and authenticates as that
workspace''s admin user — it is not tied to an individual person, and it carries admin rights
inside that workspace.
A request with a missing, unknown or revoked token gets a bare `401` with no response body.
> **Organizations on the Unlimited plan cannot use the API.** Their requests are rejected with the
> same bare `401` as an invalid token, with nothing to distinguish the two. If a valid, freshly
> generated token returns `401` on every endpoint, check the plan first.
## Errors
Failures carry a JSON body of the shape `{ "message": "..." }`. Validation failures on the newer
endpoints may add an `errors` array naming the offending fields. `401` is the exception: it has no
body at all.
Both render endpoints are **fire-and-forget** — they queue work and return immediately, so a
`200` means "accepted", not "rendered". Render failures surface only through the `video_error`
webhook, never as an HTTP error on the call that started the render.
## Scope
This reference is generated from the running code rather than maintained by hand, so it cannot
quietly fall behind the API it describes. It documents 94 operations across the
`/api/v1` surface.
Endpoints are grouped by subject in the sidebar. If something you need is missing, or an endpoint
does not behave as described here, tell us.
---
_Generated from `HEAD` at `2a2222fdbe` on 2026-11-25._'
servers:
- url: https://apis.elai.io/api/v1
security:
- sec0: []
tags:
- name: Quiz
description: Generate and rewrite quiz questions with an LLM. Nothing is persisted — save the result onto a slide yourself.
paths:
/quiz/build-question:
post:
tags:
- Quiz
summary: Render a quiz question to canvas objects (test endpoint)
description: '> **Test endpoint.** It exists to verify quiz rendering on the video-render service and is not used by the Elai web app, which builds question objects in the browser. Treat the response shape as unstable.
Turns question parameters into the canvas object that would be drawn on a slide, and returns it alongside a generated slide id.'
requestBody:
required: true
content:
application/json:
example:
questionText: What is Elai?
answers:
- text: A video platform
- text: A database
correctAnswers:
- 0
schema:
type: object
properties:
questionText:
type: string
minLength: 1
answers:
minItems: 1
type: array
items:
type: object
properties:
text:
type: string
required:
- text
additionalProperties: {}
correctAnswers:
type: array
items:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
theme:
type: string
enum:
- light
- dark
- transparent_dark
- transparent_light
layout:
type: string
enum:
- vertical
- horizontal
quizType:
type: string
enum:
- single
- multiple
feedback:
type: boolean
onCorrect:
anyOf:
- type: object
properties:
feedbackMessage:
type: string
slide:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
required:
- feedbackMessage
- type: 'null'
onWrong:
anyOf:
- type: object
properties:
feedbackMessage:
type: string
slide:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
required:
- feedbackMessage
- type: 'null'
required:
- questionText
- answers
- correctAnswers
responses:
'200':
description: The rendered canvas object.
content:
application/json:
schema:
type: object
properties:
slide:
type: string
description: Generated slide id — not persisted anywhere.
clonedCanvasObject:
type: object
description: The fabric.js canvas object for the question, with `cTop`/`cLeft` copies of its position.
additionalProperties: true
'400':
$ref: '#/components/responses/ValidationError'
operationId: build-quiz-question
/quiz/from-video/{videoId}:
post:
tags:
- Quiz
summary: Generate quiz questions from a video
description: 'Reads the speech text of the selected slides and generates quiz questions with an LLM.
Nothing is saved: the questions come back for the caller to place on slides (`PATCH /videos/{videoId}`). `placeAfterSlideId` on each quiz suggests where it belongs.
`notice` is non-null when fewer questions were produced than requested — the slides did not contain enough material. The `feedbackContextId` values are opaque, short-lived identifiers for the generation and can be ignored.
Requires the workspace to have LLM features enabled (`409` otherwise).'
parameters:
- $ref: '#/components/parameters/VideoId'
requestBody:
required: true
content:
application/json:
example:
slideIds:
- 11150988696
quizType: mixed
count: 3
answersCount: 4
avoidDuplicateTopics: true
schema:
type: object
properties:
slideIds:
minItems: 1
type: array
items:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
quizType:
default: mixed
type: string
enum:
- single
- multiple
- true-false
- mixed
placement:
default: distributed
type: string
enum:
- distributed
- end
count:
default: 0
type: integer
minimum: 0
maximum: 10
answersCount:
type: integer
minimum: 2
maximum: 6
feedback:
default: false
type: boolean
avoidDuplicateTopics:
default: true
type: boolean
responses:
'200':
description: Generated questions, unsaved.
content:
application/json:
schema:
type: object
properties:
quizzes:
type: array
items:
$ref: '#/components/schemas/QuizQuestion'
notice:
oneOf:
- type: object
properties:
message:
type: string
requestedCount:
type: integer
generatedCount:
type: integer
- type: 'null'
description: Set when fewer questions were generated than asked for.
feedbackContextId:
type: string
description: Opaque, short-lived identifier for this generation. Safe to ignore.
feedbackContextsByQuizIndex:
type: array
items:
type: string
description: Per-question equivalents of `feedbackContextId`, aligned with `quizzes`.
'400':
description: The video has no slides, or the selected slides contain no speech.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
message: No text content was found in the selected source. Please select slides with text content or provide a different source.
'404':
description: One or more requested `slideIds` do not exist on the video.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
message: 'Slides not found: 11150988696'
'409':
$ref: '#/components/responses/LlmNotAllowed'
'500':
description: The LLM call failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
example:
message: LLM service is temporarily unavailable. Please try again.
operationId: generate-quiz-from-video
/quiz/regenerate-question:
post:
tags:
- Quiz
summary: Rephrase or regenerate one quiz question
description: 'Takes an existing question and returns a new version of it. Stateless — nothing is persisted.
Two modes, with mutually exclusive knobs:
**`rephrase`** — improve the wording. Answer count, quiz type and the number of correct answers are preserved (though which positions are correct may move). Combine hint keys in `instructions` (e.g. `improve_clarity`, `more_professional`). `quizType` and `answersCount` are **rejected** in this mode.
**`regenerate`** — reshape the question, e.g. change type or option count via `quizType` and `answersCount` (`0` lets the model choose). Feedback text is always regenerated. `instructions` are **rejected** in this mode.
`notice` reports `insufficient_data` when the input question was underspecified; the model still runs.'
requestBody:
required: true
content:
application/json:
example:
mode: rephrase
instructions:
- improve_clarity
shouldRegenerateFeedback: false
question:
questionText: What is Elai?
answers:
- text: A video platform
- text: A database
correctAnswers:
- 0
schema:
type: object
properties:
mode:
type: string
enum:
- rephrase
- regenerate
question:
type: object
properties:
questionText:
type: string
answers:
minItems: 1
type: array
items:
type: object
properties:
text:
type: string
required:
- text
additionalProperties: {}
correctAnswers:
type: array
items:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
theme:
type: string
enum:
- light
- dark
- transparent_dark
- transparent_light
layout:
type: string
enum:
- vertical
- horizontal
quizType:
type: string
enum:
- single
- multiple
feedback:
type: boolean
onCorrect:
anyOf:
- type: object
properties:
feedbackMessage:
type: string
slide:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
required:
- feedbackMessage
- type: 'null'
onWrong:
anyOf:
- type: object
properties:
feedbackMessage:
type: string
slide:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
required:
- feedbackMessage
- type: 'null'
required:
- questionText
- answers
- correctAnswers
quizType:
type: string
enum:
- single
- multiple
- true-false
- mixed
answersCount:
type: integer
minimum: -9007199254740991
maximum: 9007199254740991
shouldRegenerateFeedback:
default: false
type: boolean
instructions:
default: []
type: array
items:
type: string
enum:
- polish_wording
- improve_clarity
- make_concise
- more_professional
- more_engaging
- more_simple
- more_conversational
required:
- mode
- question
responses:
'200':
description: The rewritten question.
content:
application/json:
schema:
type: object
properties:
question:
$ref: '#/components/schemas/QuizQuestion'
notice:
oneOf:
- type: object
properties:
kind:
type: string
enum:
- insufficient_data
message:
type: string
- type: 'null'
'400':
description: Body shape invalid, or a field was sent that the chosen `mode` rejects.
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorBody'
'409':
$ref: '#/components/responses/LlmNotAllowed'
'500':
description: The LLM call failed.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
operationId: regenerate-quiz-question
components:
schemas:
ValidationErrorBody:
type: object
description: Schema-validation failure, produced by the Zod validation middleware.
properties:
message:
type: string
errors:
type: array
description: Per-field problems, when available.
items:
type: object
additionalProperties: true
Error:
type: object
properties:
message:
type: string
description: Human-readable explanation of the failure.
QuizQuestion:
type: object
description: A generated quiz question, ready to place on a slide. Extra canvas/theme fields round-trip unchanged.
properties:
questionText:
type: string
answers:
type: array
items:
type: object
properties:
text:
type: string
additionalProperties: true
correctAnswers:
type: array
items:
type: integer
description: Indexes into `answers`.
feedback:
type: object
description: Messages shown after answering.
properties:
onCorrect:
type: string
onWrong:
type: string
slideIds:
type: array
items:
type: integer
description: Slides the question was derived from.
placeAfterSlideId:
type:
- integer
- 'null'
description: Suggested position for the quiz slide.
additionalProperties: true
responses:
ValidationError:
description: Request body failed schema validation. The response lists the offending fields.
content:
application/json:
schema:
$ref: '#/components/schemas/ValidationErrorBody'
LlmNotAllowed:
description: AI features are not enabled for this workspace, or its LLM usage allowance is exhausted.
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
parameters:
VideoId:
name: videoId
in: path
required: true
schema:
type: string
description: Video id (24-char hex ObjectId).
securitySchemes:
sec0:
type: apiKey
in: header
name: Authorization
x-bearer-format: bearer
x-default: SECRET_KEY
x-provenance:
method: searched
source: https://elai.readme.io/reference
harvested: '2026-12-01'
tool: harvest-readme-openapi.py
note: Assembled verbatim from the OpenAPI definition ReadMe embeds in each operation page of the provider's developer portal; paths and components merged by API title, nothing authored.
assembled_from:
- https://elai.readme.io/reference/apply-brand-kit.md
- https://elai.readme.io/reference/apply-template.md
- https://elai.readme.io/reference/avatars-list.md
- https://elai.readme.io/reference/build-outline-video.md
- https://elai.readme.io/reference/build-quiz-question.md
- https://elai.readme.io/reference/build-video-lesson.md
- https://elai.readme.io/reference/check-upload-usage.md
- https://elai.readme.io/reference/choose-lesson-template.md
- https://elai.readme.io/reference/copy-video-by-template.md
- https://elai.readme.io/reference/copy-video.md
- https://elai.readme.io/reference/create-from-pptx.md
- https://elai.readme.io/reference/create-from-text-url.md
- https://elai.readme.io/reference/create-outline.md
- https://elai.readme.io/reference/create-upload-folder.md
- https://elai.readme.io/reference/create-user.md
- https://elai.readme.io/reference/create-video.md
- https://elai.readme.io/reference/create-voice-customization.md
- https://elai.readme.io/reference/delete-upload-folder.md
- https://elai.readme.io/reference/delete-upload.md
- https://elai.readme.io/reference/delete-uploads.md
- https://elai.readme.io/reference/delete-user.md
- https://elai.readme.io/reference/delete-video.md
- https://elai.readme.io/reference/delete-voice-customization.md
- https://elai.readme.io/reference/download-scorm-package.md
- https://elai.readme.io/reference/generate-api-token.md
- https://elai.readme.io/reference/generate-outline-chapters.md
- https://elai.readme.io/reference/generate-outline-quiz.md
- https://elai.readme.io/reference/generate-outline-script.md
- https://elai.readme.io/reference/generate-quiz-from-video.md
- https://elai.readme.io/reference/generate-slides.md
- https://elai.readme.io/reference/get-slide-screenshots.md
- https://elai.readme.io/reference/get-speech-duration.md
- https://elai.readme.io/reference/inspect-presentation.md
- https://elai.readme.io/reference/list-avatar-frames.md
- https://elai.readme.io/reference/list-custom-voices.md
- https://elai.readme.io/reference/list-fonts.md
- https://elai.readme.io/reference/list-lesson-templates.md
- https://elai.readme.io/reference/list-music-tracks.md
- https://elai.readme.io/reference/list-templates.md
- https://elai.readme.io/reference/list-upload-folder-names.md
- https://elai.readme.io/reference/list-uploads.md
- https://elai.readme.io/reference/list-users.md
- https://elai.readme.io/reference/list-video-edit-history.md
- https://elai.readme.io/reference/list-video-exports.md
- https://elai.readme.io/reference/list-videos.md
- https://elai.readme.io/reference/list-voice-customizations.md
- https://elai.readme.io/reference/llm-generate-speech.md
- https://elai.readme.io/reference/llm-rewrite-speech.md
- https://elai.readme.io/reference/move-upload.md
- https://elai.readme.io/reference/move-uploads.md
- https://elai.readme.io/reference/paste-story-html.md
- https://elai.readme.io/reference/preview-lesson-template-layouts.md
- https://elai.readme.io/reference/preview-video-lesson-restyle.md
- https://elai.readme.io/reference/preview-voice-customization.md
- https://elai.readme.io/reference/rebuild-video-lesson.md
- https://elai.readme.io/reference/regenerate-outline-quiz.md
- https://elai.readme.io/reference/regenerate-outline-speech.md
- https://elai.readme.io/reference/regenerate-quiz-question.md
- https://elai.readme.io/reference/render-personalized.md
- https://elai.readme.io/reference/render-video.md
- https://elai.readme.io/reference/restyle-video-lesson.md
- https://elai.readme.io/reference/retrieve-api-config.md
- https://elai.readme.io/reference/retrieve-avatar.md
- https://elai.readme.io/reference/retrieve-current-user.md
- https://elai.readme.io/reference/retrieve-lesson-template.md
- https://elai.readme.io/reference/retrieve-outline.md
- https://elai.readme.io/reference/retrieve-player-payload.md
- https://elai.readme.io/reference/retrieve-signed-url.md
- https://elai.readme.io/reference/retrieve-template.md
- https://elai.readme.io/reference/retrieve-upload-folder-breadcrumbs.md
- https://elai.readme.io/reference/retrieve-upload-folder-info.md
- https://elai.readme.io/reference/retrieve-upload-folder.md
- https://elai.readme.io/reference/retrieve-video-lesson-design.md
- https://elai.readme.io/reference/retrieve-video-source-links.md
- https://elai.readme.io/reference/retrieve-video.md
- https://elai.readme.io/reference/revoke-api-token.md
- https://elai.readme.io/reference/rewrite-outline-speech.md
- https://elai.readme.io/reference/search-upload-folders.md
- https://elai.readme.io/reference/submit-custom-voice.md
- https://elai.readme.io/reference/synthesize-speech.md
- https://elai.readme.io/reference/translate.md
- https://elai.readme.io/reference/update-avatar.md
- https://elai.readme.io/reference/update-outline.md
- https://elai.readme.io/reference/update-upload-folder.md
- https://elai.readme.io/reference/update-user.md
- https://elai.readme.io/reference/update-video.md
- https://elai.readme.io/reference/update-voice-customization.md
- https://elai.readme.io/reference/upload-confirm.md
- https://elai.readme.io/reference/upload-custom-voice.md
- https://elai.readme.io/reference/upload-music-track.md
- https://elai.readme.io/reference/voices-list.md
- https://elai.readme.io/reference/webhook-set-secret-token.md
- https://elai.readme.io/reference/webhook-subscribe.md
- https://elai.readme.io/reference/webhook-unsubscribe.md
merge:
pages: 94
deduped: 253
conflicts_kept_first: 0