Skip to main content
POST

Overview

A quiz video plays your questions one after another. For each question a voice reads it, the answer options appear, a countdown runs, and the correct option turns green. You send the finished questions; nothing is generated from a topic on this endpoint. The background is a gameplay clip by default. It can also be AI images, AI video clips or your own media.
The voice reads each question exactly as you wrote it. Write the questions in the language you want them read in and pick a voice that speaks it.
The request returns a projectId right away. The video is generated and rendered in the background.

Only questions and voiceId are required. Each question has 2 to 4 options and a zero-based correctIndex (correct_index is accepted too). The background defaults to the subway-s-1 gameplay clip; gameplaySettings applies to gameplay only, presetSettings to ai-images / ai-videos only, and media to media only.


What happens next

  1. Keep the projectId.
  2. Either poll GET /v1/project/{projectId} until video.status is COMPLETED (or the project status is failed), or pass a webhook and wait for the call.
  3. Download the file from video.url (or data.url in the webhook).
The webhook receives { "status": "COMPLETED", "message": "Video completed", "data": { "videoId", "projectId", "status": "COMPLETED", "url", "metadata" } }. A project that fails before it has a video sends "status": "FAILED" with videoId: null. See Webhooks.

Credits and your own keys

Teams on Hooked’s keys (managed): the project is priced from the number of questions, the answer and reveal times, and the background (media type, quality or model). The credits are taken up front; if the balance is short, the request answers 402 INSUFFICIENT_CREDITS and nothing is created. If the project fails later, the credits are refunded automatically. Teams on their own keys (BYOK): no credits are charged. The team needs these keys in Settings → AI keys:
  • OpenRouter: always.
  • ElevenLabs: for the narration.
  • Gemini: when presetSettings.aiModel is gemini_omni_flash.
A missing key answers 402 missing_credentials with the list in missingProviders, before anything is created.

Errors

Send an Idempotency-Key header to retry safely: if a request times out or answers 5xx, sending it again with the same key and body returns the first answer instead of creating (and charging) the project twice.

Next Steps

Get Project

Follow the project until the video is ready

Webhooks

Payloads and delivery rules

List Voices

Pick a voice

Reddit Story

Another background-video format

Authorizations

x-api-key
string
header
required

Headers

Idempotency-Key
string

Makes the request safe to retry. 1-255 printable ASCII characters, one per operation (your job id, or a UUID you store), reused on every retry. Within 24 hours the same key with the same body answers with the first response and the header Idempotent-Replayed: true, without running or charging again. Keys are scoped to your team and the endpoint. 5xx answers and refusals before anything ran (401, 402, 403, 409, 429) are not kept. See Idempotency.

Required string length: 1 - 255
Pattern: ^[\x20-\x7E]+$

Body

application/json
questions
object[]
required

Between 2 and 10 finished questions, in the order they are played. Nothing is generated from a topic: each question is read by the voice exactly as written, so write them in the language you want them read in.

Required array length: 2 - 10 elements
voiceId
string
required

Narrator voice: a library voice ID from /v1/voice/list or one of your team's custom voices. An unknown ID answers 400.

Required string length: 1 - 30
name
string

Project name (max 100 characters). Defaults to title.

Maximum string length: 100
title
string

Quiz title, shown at the top for the whole video (max 120 characters). Also the project name when name is not set.

Maximum string length: 120
answerSeconds
number
default:5

Seconds the options stay on screen before the reveal (1-15).

Required range: 1 <= x <= 15
revealSeconds
number
default:2

Seconds the revealed answer stays on screen (0.5-6).

Required range: 0.5 <= x <= 6
showOutro
boolean
default:true

End with an outro card.

outroText
string
default:Great job! Share your score in the comments!

Text of the outro card (max 160 characters). Only with showOutro: true.

Maximum string length: 160
optionsStyle
object

Look of the quiz text and answer rows.

mediaType
enum<string>
default:gameplay

Background visuals: a gameplay clip (default), AI images, AI video clips or your own library media. motion-graphics is not offered for this format and answers 400.

Available options:
gameplay,
ai-images,
ai-videos,
media
presetSettings
object

mediaType ai-images / ai-videos only: the generated background. preset and aiModel apply to both; quality and isContinuous to ai-videos only.

gameplaySettings
object

mediaType gameplay only: the background clip. Games and their clips: minecraft (minecraft-1 … minecraft-9), subway-s (subway-s-1 … subway-s-11), temple-run (temple-run-1 … temple-run-8), gta (gta-1 … gta-12), fortnite (fortnite-1 … fortnite-5), roblox (roblox-1), free-fire (free-fire-1). A clip that does not exist plays the game's first clip. Use custom as selectedGame to play one of your own library videos: selectedVideo is then its media ID, and an ID that is not a video in your library answers 400.

media
string[]

mediaType media only, and required there: IDs of images or videos in your team's media library (max 50). An ID that is not in your library answers 400 (media: Media "<id>" not found). A media that is not COMPLETED yet (an import or upload in progress) answers 400 media: Media "<id>" is not ready (status PROCESSING).

Maximum array length: 50

Media ID from your library

aspectRatio
enum<string>
default:ratio_9_16
Available options:
ratio_9_16,
ratio_16_9,
ratio_1_1
caption
object

The question text on screen. The quiz draws it in its own style, so only disabled applies.

audio
object

Narrator voice settings (ElevenLabs). Omitted fields keep their defaults.

content
object

Branding.

musicId
string

Background music: a track ID from /v1/music/list or your team's own uploaded music. An unknown ID answers 400.

Maximum string length: 30
webhook
string<uri>

HTTPS URL on a public host, called when the video is ready or the project fails (max 500 characters). Requests are signed: verify the Hooked-Signature header (HMAC-SHA256 of ".") with the signing secret from Settings → Webhooks; Hooked-Event and Hooked-Delivery headers name the event and the delivery. No redirects are followed; 10 s timeout; 3 immediate attempts. See the Webhooks guide for the payload.

Maximum string length: 500
metadata
object

Any JSON object of your own (max 5 KB). Sent back in the webhook payload. The key automationId is reserved for dashboard automations and is removed.

Response

Project created. Follow it with GET /v1/project/{projectId} or wait for the webhook.

success
enum<boolean>
required
Available options:
true
data
object
required
message
string
required