HTTP API
videobana-http-api · Complete reference for the Videobana HTTP API: every endpoint with its method, path, authentication, request fields, responses, errors and a curl example; API tokens and how to send them; which endpoints are public; the monthly allowance (402) and jobs-in-progress (429) limits; the error format and every error code; background jobs for render, export and voice-over with polling, webhooks and downloads; export options; walkthrough endpoints; and complete scripts in curl, Node.js and Python. Use it when writing code or commands that call the Videobana API: creating, validating, rendering or exporting videos from JSON, generating or revising documents with the AI, painting pictures, composing music or product ads, uploading files, sharing public videos, managing walkthroughs, or handling API errors and quotas.
Everything the Videobana HTTP API at https://www.bana.video accepts and answers: every endpoint with its method, path, authentication, request fields, responses and a ready-to-run command, the API tokens, the allowance and its limits, the errors, the background jobs, the export options, and complete scripts. Generated from the code of the server, so it matches what the server does.
Overview
The API speaks JSON over HTTP at https://www.bana.video. Everything the dashboard does is an API call: create videos from a JSON video document or from a topic, export them in any format, and download the files from your own code. Every command below already uses this address; set API_TOKEN in your shell first.
Making a video takes four calls, and the first one can do the work of the first two:
- Send the document with
POST /api/render, orPOST /api/videosto store it first. It is validated; problems come back as a 422 with their paths. - Start the export. Unless you used
render, callPOST /api/videos/{id}/exportswith the format, shape and resolution you want. You get a job back immediately (202). - Wait for the job. Poll
GET /api/jobs/{id}every second or two untilstatusisdone(or send acallbackUrl). The first export of a video also records the voice-over, which takes a little longer. - Download with
GET /api/jobs/{id}/download, which redirects to the file.
Exports run in the background, a few at a time. Anything over the limit waits its turn and shows as queued. Jobs and their files are kept until you delete them.
Conventions
- Requests with a body send JSON (
Content-Type: application/json), except the small upload (POST /api/assets), whose body is the raw file. A JSON body may be at most 1 MB; an empty body counts as{}. - Request bodies are strict: a field the endpoint does not know is refused with 400
bad_request(only the dashboard'sPUT /api/preferences/{key}drops unknown fields instead). - Ids of videos, jobs, files and walkthroughs are 16 lowercase hexadecimal characters (
b921df158655611f). - Times are ISO 8601 in UTC (
2026-10-12T21:35:31.303Z). - Addresses in answers (
/api/assets/…,/api/jobs/…) are paths on this server: put the origin in front of them. - A
201or202that creates something carries aLocationheader pointing to it. - Files (exports, recordings, uploads) are answered with a
307redirect to a short-lived signed address in file storage, which supportsRangerequests: follow redirects (curl -L,fetchdoes by default) and ask again for a fresh address when one has expired. - Only the public endpoints (
/api/public/*,/api/examples/{id}and the example voices) answer browsers on other sites (CORSAccess-Control-Allow-Origin: *). Call everything else from a server, and never put a token in a web page. - Long calls (writing with the AI, painting pictures, reading pages) answer when they are done: allow a few minutes before timing out. A request that is cancelled by the client stops the work.
Authentication
Every endpoint that touches an account needs an API token; the public ones (listed below) need none. A token acts as you: it sees only your videos, files, jobs and walkthroughs, and what it does counts against your plan. There are no scopes: a token can do everything your account can through the API, except the administrator's endpoints, which a token never opens.
Create a token
- Sign in and open API tokens (
https://www.bana.video/settings/api-tokens) in the settings. - Give the token a name (1 to 60 characters) and choose how long it stays valid:
never(No expiry),30d(30 days),90d(90 days),365d(1 year). - Copy the token at once: it is shown this one time and never again (only a hash of it is kept). The list shows its first characters, when it was created, last used (updated at most once a minute) and when it expires.
- An account can have up to 10 active tokens; revoke one you no longer use on the same page. Revoking takes effect at once. Tokens are made and revoked only on that page: there is no API for it.
Send the token
Tokens start with ve_, so secret scanners can recognise a leaked one. Send it with every request in either header:
Authorization: Bearer ve_…
x-api-key: ve_…curl https://www.bana.video/api/videos \
-H "Authorization: Bearer $API_TOKEN"Beareris not case-sensitive. When both headers are sent,Authorizationwins.- A request that carries a token must carry a good one: an unknown, revoked or expired token, or anything that does not start with
ve_, is answered 401unauthorized, even when the browser also has a session cookie. - A token of a deactivated account is answered 403
forbidden("This account has been deactivated."). - Without a token, a request is let in by the session cookie of a browser signed in on this site; a request that changes something (not
GET,HEADorOPTIONS) must then also come from this site's own pages (Sec-Fetch-SiteandOrigin), or it is answered 403forbidden("This request came from another site."). Neither a token nor a cookie: 401unauthorized. - Keep tokens out of web pages, apps you ship and public repositories; give each script or server its own token, so one can be revoked without the others.
Access by endpoint
Every route of the server, how it lets callers in, and whether the API guide (/docs/api) lists it. Endpoints the guide does not list are described in “Endpoints the API guide does not list”.
| Access | Meaning |
|---|---|
| API token (or a signed-in browser session) | An API token (Authorization: Bearer <token> or x-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to. |
| None: public | None. Anyone may call it; no token is read (an Authorization header is ignored). |
| Signed-in browser session only | Only a person signed in with a browser session on this site, from this site's own pages. A token never opens it, whatever the account: it is answered 403 forbidden, because what these endpoints do cannot be undone. |
| Administrator's browser session only | Only an administrator signed in with a browser session. A token never opens it, whoever it belongs to; anyone else is told 404. |
| Internal: the render token of a running export | Not for integrators. Only a running export calls it, proving itself with its own secret in the x-render-token header, which stops working when the export ends. |
| Render machine: the secret of a machine added in the admin pages | Not for integrators. Only the program of a render machine calls it, proving itself with the secret of that machine (Authorization: Bearer vw_…, shown once when an administrator added the machine). A secret that is not known is answered 401, and a machine an administrator switched off 403. An API token or a browser session does nothing here. |
| Browser sign-in service, not part of the API | The browser's own sign-in, sign-up, sign-out and session calls, passed on to the sign-in service (Neon Auth). Not part of the API: a token does nothing here. |
| Method | Path | Access | In /docs/api |
|---|---|---|---|
POST | /api/render | API token (or a signed-in browser session) | yes |
GET | /api/jobs/{id} | API token (or a signed-in browser session) | yes |
DELETE | /api/jobs/{id} | API token (or a signed-in browser session) | yes |
GET | /api/jobs/{id}/download | API token (or a signed-in browser session) | yes |
POST | /api/jobs/{id}/parts | Internal: the render token of a running export | no |
POST | /api/sources | API token (or a signed-in browser session) | yes |
POST | /api/generate | API token (or a signed-in browser session) | yes |
POST | /api/revise | API token (or a signed-in browser session) | yes |
POST | /api/publish | API token (or a signed-in browser session) | yes |
POST | /api/music | API token (or a signed-in browser session) | yes |
POST | /api/images | API token (or a signed-in browser session) | yes |
POST | /api/images/plan | API token (or a signed-in browser session) | yes |
GET | /api/usage | API token (or a signed-in browser session) | yes |
POST | /api/product/crawl | API token (or a signed-in browser session) | yes |
POST | /api/product/pictures | API token (or a signed-in browser session) | yes |
POST | /api/product/compose | API token (or a signed-in browser session) | yes |
POST | /api/product/pack | API token (or a signed-in browser session) | yes |
POST | /api/validate | None: public | yes |
GET | /api/videos | API token (or a signed-in browser session) | yes |
POST | /api/videos | API token (or a signed-in browser session) | yes |
GET | /api/videos/{id} | API token (or a signed-in browser session) | yes |
PUT | /api/videos/{id} | API token (or a signed-in browser session) | yes |
PATCH | /api/videos/{id} | API token (or a signed-in browser session) | yes |
DELETE | /api/videos/{id} | API token (or a signed-in browser session) | yes |
PUT | /api/videos/{id}/visibility | API token (or a signed-in browser session) | yes |
POST | /api/videos/{id}/duplicate | API token (or a signed-in browser session) | yes |
POST | /api/videos/{id}/transfer | Signed-in browser session only | no |
POST | /api/videos/{id}/narration | API token (or a signed-in browser session) | yes |
GET | /api/videos/{id}/audio | API token (or a signed-in browser session) | yes |
GET | /api/videos/{id}/exports | API token (or a signed-in browser session) | yes |
POST | /api/videos/{id}/exports | API token (or a signed-in browser session) | yes |
POST | /api/narration/draft | API token (or a signed-in browser session) | yes |
POST | /api/narration/draft/lookup | API token (or a signed-in browser session) | yes |
GET | /api/narration/draft/{fingerprint}/audio | API token (or a signed-in browser session) | yes |
GET | /api/assets | API token (or a signed-in browser session) | yes |
POST | /api/assets | API token (or a signed-in browser session) | yes |
POST | /api/assets/uploads | API token (or a signed-in browser session) | yes |
POST | /api/assets/uploads/{uploadId} | API token (or a signed-in browser session) | yes |
GET | /api/assets/{id} | API token (or a signed-in browser session) | yes |
DELETE | /api/assets/{id} | API token (or a signed-in browser session) | yes |
GET | /api/assets/{id}/poster | API token (or a signed-in browser session) | yes |
GET | /api/oembed | None: public | yes |
GET | /api/public/videos/{id} | None: public | yes |
GET | /api/public/videos/{id}/audio | None: public | yes |
GET | /api/public/videos/{id}/assets/{assetId} | None: public | yes |
GET | /api/schema | None: public | yes |
GET | /api/catalog | None: public | yes |
GET | /api/examples | None: public | yes |
GET | /api/examples/{id} | None: public | yes |
GET | /api/examples/voices/{fingerprint}/audio | None: public | no |
GET | /api/health | API token (or a signed-in browser session) | yes |
GET | /api/walkthroughs | API token (or a signed-in browser session) | no |
POST | /api/walkthroughs | API token (or a signed-in browser session) | no |
GET | /api/walkthroughs/{id} | API token (or a signed-in browser session) | no |
PUT | /api/walkthroughs/{id} | API token (or a signed-in browser session) | no |
DELETE | /api/walkthroughs/{id} | API token (or a signed-in browser session) | no |
GET | /api/walkthroughs/{id}/stats | API token (or a signed-in browser session) | no |
POST | /api/walkthroughs/{id}/voice | API token (or a signed-in browser session) | no |
POST | /api/walkthroughs/{id}/duplicate | API token (or a signed-in browser session) | no |
POST | /api/walkthroughs/{id}/transfer | Signed-in browser session only | no |
POST | /api/walkthroughs/key | API token (or a signed-in browser session) | no |
GET | /api/walkthroughs/appearance | API token (or a signed-in browser session) | no |
PUT | /api/walkthroughs/appearance | API token (or a signed-in browser session) | no |
DELETE | /api/walkthroughs/appearance | API token (or a signed-in browser session) | no |
GET | /api/walkthroughs/engage | API token (or a signed-in browser session) | no |
PUT | /api/walkthroughs/engage | API token (or a signed-in browser session) | no |
GET | /api/walkthroughs/engage/{collection} | API token (or a signed-in browser session) | no |
POST | /api/walkthroughs/engage/{collection} | API token (or a signed-in browser session) | no |
PATCH | /api/walkthroughs/engage/{collection} | API token (or a signed-in browser session) | no |
GET | /api/walkthroughs/engage/{collection}/{id} | API token (or a signed-in browser session) | no |
PUT | /api/walkthroughs/engage/{collection}/{id} | API token (or a signed-in browser session) | no |
PATCH | /api/walkthroughs/engage/{collection}/{id} | API token (or a signed-in browser session) | no |
DELETE | /api/walkthroughs/engage/{collection}/{id} | API token (or a signed-in browser session) | no |
POST | /api/walkthroughs/engage/{collection}/{id}/duplicate | API token (or a signed-in browser session) | no |
GET | /api/walkthroughs/engage/{collection}/{id}/stats | API token (or a signed-in browser session) | no |
POST | /api/walkthroughs/assist | API token (or a signed-in browser session) | no |
GET | /api/walkthroughs/wordpress-plugin | API token (or a signed-in browser session) | no |
POST | /api/public/assist | None: public | no |
GET | /api/public/demos/{id} | None: public | no |
GET | /api/public/demos/{id}/shots/{assetId} | None: public | no |
GET | /api/public/demos/{id}/poster | None: public | no |
POST | /api/public/demos/{id}/events | None: public | no |
GET | /api/public/walkthroughs | None: public | no |
GET | /api/public/walkthroughs/{id} | None: public | no |
GET | /api/public/walkthroughs/{id}/audio | None: public | no |
POST | /api/public/walkthroughs/{id}/events | None: public | no |
GET | /api/feedback | API token (or a signed-in browser session) | no |
PATCH | /api/feedback | API token (or a signed-in browser session) | no |
DELETE | /api/feedback | API token (or a signed-in browser session) | no |
GET | /api/feedback/{id} | API token (or a signed-in browser session) | no |
PATCH | /api/feedback/{id} | API token (or a signed-in browser session) | no |
DELETE | /api/feedback/{id} | API token (or a signed-in browser session) | no |
GET | /api/feedback/{id}/shot | API token (or a signed-in browser session) | no |
GET | /api/feedback/summary | API token (or a signed-in browser session) | no |
GET | /api/feedback/export | API token (or a signed-in browser session) | no |
POST | /api/feedback/insights | API token (or a signed-in browser session) | no |
POST | /api/public/feedback | None: public | no |
POST | /api/public/feedback/amend | None: public | no |
POST | /api/public/feedback/events | None: public | no |
POST | /api/public/engage/events | None: public | no |
GET | /api/me | None: public | no |
PUT | /api/preferences/{key} | API token (or a signed-in browser session) | no |
GET | /api/admin/videos/{id}/audio | Administrator's browser session only | no |
GET | /api/admin/videos/{id}/assets/{assetId} | Administrator's browser session only | no |
POST | /api/worker/hello | Render machine: the secret of a machine added in the admin pages | no |
POST | /api/worker/claim | Render machine: the secret of a machine added in the admin pages | no |
POST | /api/worker/jobs/{id}/heartbeat | Render machine: the secret of a machine added in the admin pages | no |
POST | /api/worker/jobs/{id}/upload | Render machine: the secret of a machine added in the admin pages | no |
POST | /api/worker/jobs/{id}/complete | Render machine: the secret of a machine added in the admin pages | no |
POST | /api/worker/jobs/{id}/fail | Render machine: the secret of a machine added in the admin pages | no |
POST | /api/jobs/{id}/browser/claim | Signed-in browser session only | no |
POST | /api/jobs/{id}/browser/heartbeat | Signed-in browser session only | no |
POST | /api/jobs/{id}/browser/upload | Signed-in browser session only | no |
POST | /api/jobs/{id}/browser/complete | Signed-in browser session only | no |
POST | /api/jobs/{id}/browser/fail | Signed-in browser session only | no |
GET | /api/auth/{...path} | Browser sign-in service, not part of the API | no |
POST | /api/auth/{...path} | Browser sign-in service, not part of the API | no |
PUT | /api/auth/{...path} | Browser sign-in service, not part of the API | no |
DELETE | /api/auth/{...path} | Browser sign-in service, not part of the API | no |
PATCH | /api/auth/{...path} | Browser sign-in service, not part of the API | no |
Allowance, quotas and limits
Every month your plan allows a number of videos, AI tokens, AI pictures, exports and voice-over recordings, and seconds of premium voice-over, as shown on the Usage page and by GET /api/usage. The API and the dashboard share the same allowance. The month is a calendar month in UTC; the allowance starts over at its end (periodEnd). When one is used up, the call answers 402 quota_exceeded with the details, and nothing is started or charged. Work that fails or is cancelled is given back.
| Plan | id | US$ / month | Open to subscribe | Videos | AI tokens | AI images | Exports | Voice-overs | Premium voice-over (seconds) |
|---|---|---|---|---|---|---|---|---|---|
| Free | free | 0.00 | yes | 50 | 5,000,000 | 100 | 100 | 100 | 180 |
| Pro | pro | 19.00 | not yet | 500 | 50,000,000 | 1,000 | 1,000 | 1,000 | 1,800 |
| Business | business | 79.00 | not yet | 5,000 | 250,000,000 | 10,000 | 10,000 | 10,000 | 18,000 |
What counts against each kind
| Kind | What spends it |
|---|---|
video | Storing a new video: POST /api/videos, POST /api/render, POST /api/videos/{id}/duplicate, and save: true on POST /api/generate, POST /api/product/compose and POST /api/product/pack (one for each ad). Replacing, renaming or deleting a video takes nothing (and deleting gives nothing back). |
ai_tokens | The prompt and completion tokens of every call to the language model (writing, revising, post copy, the art director's plan, reading a product page or its pictures, the words of an ad), counted after the call. A call is refused with 402 up front only when the balance is already at zero; the call that crosses zero is finished and the balance stops at zero. A music track counts a fixed amount (clip 50,000, song 100,000). |
image | Each picture that comes out of POST /api/images. The whole request is taken up front (402 when fewer credits are left than pictures asked for, and nothing is painted), and the pictures that did not come out are given back. POST /api/images/plan needs at least one credit left but takes none. |
export | Each export of a format that is drawn frame by frame (mp4, webm, mov, gif, png). mp3, srt, vtt, json do not count as an export. |
voiceover | Recording a voice-over with the standard voice: an export or POST /api/videos/{id}/narration that has to record it, POST /api/narration/draft, and POST /api/walkthroughs/{id}/voice. Nothing is taken when the recording exists already, or for a json export. |
premium_voice | The seconds the premium voice speaks (rounded up to whole seconds), counted as it speaks. The work is refused up front with 402 when nothing is left; sentences recorded before are not recorded again. |
The 402 answer
error.details says which allowance (kind), its limit, what is used and when it starts over (resetsAt):
{
"error": {
"code": "quota_exceeded",
"message": "You have used all 100 video exports of the Free plan this month. The allowance starts over on 1 Dec 2026.",
"details": {
"kind": "export",
"limit": 100,
"used": 100,
"resetsAt": "2026-12-01T00:00:00.000Z"
}
}
}Work in progress
An account can have only a few exports, and a few voice-over recordings, in progress (queued or running) at once: two of each with the server's settings. One more is answered 429 too_many_requests; wait for one to finish, or cancel it (DELETE /api/jobs/{id}), then try again. The API does not otherwise limit how many requests you send.
Errors
Errors have a status code and the same body everywhere: a stable code to program against, a message for people and sometimes details.
{
"error": {
"code": "invalid_spec",
"message": "The video JSON has 2 problems.",
"details": {
"errors": [
{
"level": "error",
"path": "scenes[0].items[0].icon",
"message": "Required field is missing."
},
{
"level": "error",
"path": "scenes[0].items[0].say",
"message": "Required field is missing."
}
],
"warnings": []
}
}
}| Status | code | When |
|---|---|---|
| 400 | bad_request | The request body is missing, not JSON, or has fields the endpoint does not know or values it does not accept. error.details.issues lists each one with its path. |
| 401 | unauthorized | The request carried no API token, or one that is not valid (unknown, revoked or expired). |
| 402 | quota_exceeded | The monthly allowance of your plan is used up (videos, AI tokens, AI images, exports, voice-overs or premium voice-over). error.details says which (kind), the limit and when it starts over (resetsAt). |
| 403 | forbidden | The token belongs to a deactivated account, or the request is not allowed (such as a setting only Videobana writes). |
| 404 | not_found | No such video or job. |
| 409 | conflict | The action does not fit the state, such as downloading an export that is still running, or illustrating a video whose scenes all have a picture already. |
| 413 | too_large | The JSON body is over 1 MB, or an upload is over the limit of its kind (use the two-step upload for large files). |
| 422 | invalid_spec | The video document has problems. error.details.errors lists each one with its path and a hint. |
| 429 | too_many_requests | You already have as many exports (or voice-over recordings) in progress as are allowed at once. Wait for one to finish, or cancel it. |
| 499 | cancelled | The client cancelled the request before it was answered. |
| 500 | internal_error | Something went wrong on the server. Try again, and tell us if it keeps happening. |
| 502 | upstream_error | The AI model did not produce a valid document, even after repairs. error.details.errors has the last problems. |
| 503 | service_unavailable | A part the request needs is not available: the voice server, Chrome, ffmpeg or the AI key (the same key paints pictures). GET /api/health says which. |
A request body that does not pass its schema is answered like this:
{
"error": {
"code": "bad_request",
"message": "The request is not valid: topic: Too small: expected string to have >=3 characters",
"details": {
"issues": [
{
"path": "topic",
"message": "Too small: expected string to have >=3 characters"
}
]
}
}
}- Program against
error.code, not the message, which may change. 422 invalid_speclists every problem of a video document with itspath,messageand often ahintinerror.details.errors(warnings inerror.details.warnings).POST /api/validategives the same list without storing anything.429and402are not fixed by retrying at once: wait for a job to finish, or for the month to start over (resetsAt).502(the AI did not produce a valid result) can succeed on another try;503names a part that is missing on the server:GET /api/healthsays which.- A file served directly by the server (an example's voice) answers a
Rangeit cannot serve with416. - The browser sign-in routes (
/api/auth/*) are not part of the API and have their own body; while email sign-up is paused they answer 403{ "code": "EMAIL_SIGN_UP_PAUSED", "message": … }.
Jobs: long work in the background
Exports and voice-over recordings run as jobs. The call that starts one answers at once (202, with Location: /api/jobs/<id>) with the job; the work goes on after the answer. These start jobs:
POST /api/renderandPOST /api/videos/{id}/exports: anexportjob, which records the voice-over first when it needs one.POST /api/videos/{id}/narration: anarrationjob for a stored video.POST /api/narration/draft: anarrationjob for a document that is not stored (202), or the recording at once when it exists (200).POST /api/walkthroughs/{id}/voice: records a walkthrough's voice, answering{ walkthrough, job }.
The job
| Field | What it is |
|---|---|
id | 16 hexadecimal characters. |
kind | export, or narration (recording a voice-over). |
videoId | The video it works on. The voice-over of a document that is not stored (POST /api/narration/draft, POST /api/walkthroughs/{id}/voice) has a placeholder here instead of a video id. |
status | queued, running, done, failed or cancelled. The last three are final. |
phase | What it is doing right now, in words (Waiting to start, Recording the voice, Drawing frames, Done). |
progress | From 0 to 1. |
options | The export options as they are applied (the shape filled in from the document when the request left it out); null for a narration job. |
error | Why it failed, in words; null otherwise. |
file | The finished file, { name, mime, bytes }; null until the job is done, and always for a narration job. |
createdAt | ISO 8601 time. |
startedAt | ISO 8601 time, or null while it waits. |
finishedAt | ISO 8601 time, or null until it ends. |
{
"job": {
"id": "75ae15a72b77b7b1",
"kind": "export",
"videoId": "b921df158655611f",
"status": "done",
"phase": "Done",
"progress": 1,
"options": {
"format": "mp4",
"aspect": "9:16",
"resolution": "1080p",
"fps": 30,
"quality": "standard",
"captions": true
},
"error": null,
"file": {
"name": "output.mp4",
"mime": "video/mp4",
"bytes": 5836270
},
"createdAt": "2026-10-12T21:38:44.157Z",
"startedAt": "2026-10-12T21:38:44.159Z",
"finishedAt": "2026-10-12T21:39:08.640Z"
}
}Following a job
- Poll
GET /api/jobs/{id}every second or two untilstatusisdone,failedorcancelled.progress(0 to 1) andphasesay how far it is. - Or set
callbackUrlin the export options: when the job ends (done, failed or cancelled) the server POSTs{ "event": "job.finished", "job": { … } }to it as JSON, withUser-Agent: videobana-webhook/1, once, waiting at most 10 seconds. A redirect is not followed, an answer other than 2xx is only logged, and a receiver that is down does not affect the job. The address must behttporhttpson the public internet: one on a private network (localhost,10.x.x.x,192.168.x.x) is refused with 400 when the export is asked for. Put a secret in its path or query to recognise the calls. - When
done,GET /api/jobs/{id}/downloadredirects (307) to the file, sent as an attachment named after the video's title (why-the-sky-is-blue-9x16-1080p.mp4). Before that it answers 409. A narration job has no file: read the video (narration.status) or the draft instead. DELETE /api/jobs/{id}stops a queued or running job (it answers the job, nowcancelled) or deletes a finished one with its file (204). Whatever a failed or cancelled job took from the allowance is given back.
On a serverless host a job that runs out of the time the host allows is stopped with a message in error (try a lower resolution or frame rate, or a shorter video). A job whose server stopped reporting is marked failed, so no job stays running for ever. GET /api/videos/{id}/exports lists a video's exports, newest first.
Export options
The body of POST /api/videos/{id}/exports, and the options of POST /api/render. Every field is optional; unknown fields are rejected.
| Field | Type | Required | Description |
|---|---|---|---|
format | enum | no | What to produce. Allowed: mp4, webm, mov, gif, mp3, png, srt, vtt, json. |
aspect | enum | no | Shape of the picture: 16:9 landscape, 9:16 vertical, 1:1 square... Default: the shape the video was made for (aspect in its document), else 16:9. Allowed: 16:9, 4:3, 1:1, 4:5, 3:4, 9:16. |
resolution | enum | no | Pixels of the shorter side: 1080p is 1920×1080 for 16:9 and 1080×1920 for 9:16. Allowed: 360p, 480p, 720p, 1080p, 1440p, 2160p. |
fps | integer | no | Frames per second. Limits: 10–60. |
quality | enum | no | Encoder quality. draft is fastest. Allowed: draft, standard, high. |
captions | boolean | no | Draw the captions into the picture. Default true. |
at | number | no | For png: the moment (seconds) to capture. Default: the title card. |
settle | integer | no | For png: milliseconds of animation played before the capture. Default 2000, when everything has finished arriving; 0 freezes the first instant of every animation. Limits: 0–10000. |
music | object | no | Mix background music under the narration (mp4, webm, mov and mp3). |
music.src | string | yes | Address of the music: an http(s) link to an MP3, WAV, M4A or OGG file. It loops to fill the video and fades out at the end. Limits: up to 2000 characters. |
music.volume | number | no | Loudness of the music, 0 to 1, where the narration is 1. Default 0.18. Limits: 0–1. |
music.duck | boolean | no | Lower the music further while the narrator speaks. Default true. |
callbackUrl | string | no | When the job finishes (done, failed or cancelled), the job is POSTed to this address as JSON: { "event": "job.finished", "job": { … } }. It must be reachable on the public internet: addresses of private networks (localhost, 10.x.x.x, 192.168.x.x) are refused. Limits: up to 2000 characters. |
previewSeconds | number | no | Render only the first N seconds, to check settings quickly. Limits: 1–3600. |
drawIn | enum | no | Where the pictures are drawn. browser: by the browser the export was asked from, while it stays on the page (the dashboard does this by default in a browser that can: it saves a round trip and uses the computer of the person who waits). Only for mp4 and mov videos with no footage clips: for anything else it is ignored. When no browser takes the export up in a few seconds, or the page is left, a render machine or the server draws it as usual. Leave it out in scripts: there is no browser to take it, and the export would only wait a few seconds for one. Default: server. Allowed: server, browser. |
| format | Produces | Content type | Uses |
|---|---|---|---|
mp4 | H.264 + AAC. Plays everywhere: social media, phones, slides. | video/mp4 | Voice-over and picture |
webm | VP9 + Opus. Smaller files, ideal for the web. | video/webm | Voice-over and picture |
mov | H.264 + AAC in a QuickTime container, for Final Cut and iMovie. | video/quicktime | Voice-over and picture |
gif | Silent loop, limited to 480p and 15 fps. | image/gif | Voice-over and picture |
mp3 | Just the narration, for podcasts. | audio/mpeg | The voice-over |
png | One frame, for thumbnails (set at). | image/png | Voice-over and picture |
srt | Captions timed to the narration. | application/x-subrip | The script only |
vtt | Captions for HTML5 video players. | text/vtt | The script only |
json | The spec this video was made from. | application/json | The script only |
resolutionnames the pixels of the shorter side.1080pwith9:16is 1080×1920.aspect: left out, an export (POST /api/videos/{id}/exportsorPOST /api/render) is in the shape the document was made for (itsaspect), or 16:9 when it names none. Give it to export another shape.gifis capped at 480p and 15 fps and has no sound.pngcaptures one frame, atatseconds.previewSeconds(1 to 3600) renders only the start of the video: a quick way to check a setting before the full export.musicmixes background music intomp4,webm,mov,mp3(another format withmusicis refused with 422):{ "src": "https://…/song.mp3", "volume": 0.18, "duck": true }. The file is downloaded once and cached, loops to fill the video, fades in (1.5 s) and out (2.5 s), and withduckgets quieter whenever the narrator speaks. Without it, an export uses themusicsetting of the video itself, the one the editor writes. A video withsound(sound effects and a music bed made for it) has them mixed in as well, and the whole mix is mastered to about −15 LUFS.mp3of a silent video (no narration and no audio clips) is refused with 409.callbackUrlsaves you from polling: see “Jobs”.
Objects in the answers
Video
{ video } from POST /api/videos, GET/PUT/PATCH /api/videos/{id}, the visibility and duplicate endpoints, and video of the AI endpoints with save: true. GET /api/videos lists the same without narration and spec.
| Field | What it is |
|---|---|
id | 16 hexadecimal characters. |
title | The title of the document. |
domain | The topic area that sets the look (science, finance, …). |
scenes | How many scenes. |
durationSeconds | The length in seconds: estimated from the text until the voice-over is recorded, then the real one. |
look | A taste of the look for a video card: colors (three hex colours), emoji, and aspect when the shape is not 16:9 (and head, what the title card shows). |
visibility | private or public. New videos are private. |
createdAt | ISO 8601 time. |
updatedAt | ISO 8601 time. |
narration | Only when one video is read (not in the list): { status, durationSeconds }. status is silent (the document asks for no voice), missing (not recorded), outdated (the words or the voice changed since) or ready; durationSeconds is the recorded length, or null. |
spec | Only when one video is read (not in the list): the whole video document, as the validator completed it. |
File (asset)
{ asset } from the uploads and POST /api/music; { assets: [ … ] } from GET /api/assets.
| Field | What it is |
|---|---|
id | 16 hexadecimal characters. |
kind | audio, image or video (a clip). |
name | The file name (audio is converted to MP3). |
url | /api/assets/<id>: what a document refers to the file by (music.src, narration.voiceover.src, brand.logo, a scene's image, a clip's src). |
bytes | The size in bytes. |
durationSeconds | The length in seconds; null for an image. |
posterUrl | The still of a clip (/api/assets/<id>/poster); null for anything else. |
prompt | What the AI was asked to paint; null for an upload. |
transparent | Whether the picture has see-through parts (its background was cut away). |
createdAt | ISO 8601 time. |
Upload address
{ upload } from POST /api/assets/uploads.
| Field | What it is |
|---|---|
uploadId | The id to finish the upload with (POST /api/assets/uploads/{uploadId}). |
url | Where to PUT the raw bytes, straight to file storage. It works for ten minutes. Send no Authorization header there. |
headers | The headers to send with the PUT, exactly as given. |
Draft voice-over
draft of POST /api/narration/draft and POST /api/narration/draft/lookup.
| Field | What it is |
|---|---|
fingerprint | Names the exact words and voice that were recorded. |
timings | When each scene and sentence is spoken ({ audio, fingerprint, duration, scenes }). |
audioUrl | /api/narration/draft/{fingerprint}/audio: the MP3. |
Written document
What POST /api/generate (plus video) and POST /api/revise answer.
| Field | What it is |
|---|---|
spec | The video document, valid. |
warnings | What the validator still warns about ({ level, path, message, hint? }). |
attempts | How many answers of the model it took (1 = valid the first time). |
model | The language model that wrote it. |
tokens | { prompt, completion }: the tokens counted against your AI allowance. |
Usage
{ summary } from GET /api/usage.
| Field | What it is |
|---|---|
plan | { id, name, description, priceCents }. |
status | active or canceled. |
periodStart | ISO 8601: the start of the month the allowance is for (a calendar month, UTC). |
periodEnd | ISO 8601: when the allowance starts over. |
quotas | For each kind (video, ai_tokens, image, export, voiceover, premium_voice): { limit, used, remaining }. |
aiCostUsd | What the AI calls of this period cost, in US dollars. |
imageCostUsd | What the AI pictures of this period cost, in US dollars. |
premiumVoiceCostUsd | What the premium voice-over of this period cost, in US dollars. |
{
"summary": {
"plan": {
"id": "free",
"name": "Free",
"description": "Everything you need to make and share narrated videos.",
"priceCents": 0
},
"status": "active",
"periodStart": "2026-11-01T00:00:00.000Z",
"periodEnd": "2026-12-01T00:00:00.000Z",
"quotas": {
"video": {
"limit": 50,
"used": 0,
"remaining": 50
},
"ai_tokens": {
"limit": 5000000,
"used": 0,
"remaining": 5000000
},
"image": {
"limit": 100,
"used": 0,
"remaining": 100
},
"export": {
"limit": 100,
"used": 0,
"remaining": 100
},
"voiceover": {
"limit": 100,
"used": 0,
"remaining": 100
},
"premium_voice": {
"limit": 180,
"used": 0,
"remaining": 180
}
},
"aiCostUsd": 0,
"imageCostUsd": 0,
"premiumVoiceCostUsd": 0
}
}Health
GET /api/health: status is ok when every part works, else degraded. Each check is { ok, detail }; detail is Available or Unavailable, except for an administrator, who also sees what the part is and what went wrong.
| Check | What depends on it |
|---|---|
ffmpeg | Encoding: exports, audio conversion, clips. |
chrome | The headless browser that draws the frames of video exports. |
voice | The voice server of the standard voice-over. |
ai | The AI key: writing, revising, post copy, pictures, music, product ads. |
storage | File storage: uploads, recordings, exports. |
database | Videos, jobs, accounts. |
{
"status": "degraded",
"checks": {
"ffmpeg": {
"ok": true,
"detail": "Available"
},
"chrome": {
"ok": true,
"detail": "Available"
},
"voice": {
"ok": false,
"detail": "Unavailable"
},
"ai": {
"ok": true,
"detail": "Available"
},
"storage": {
"ok": true,
"detail": "Available"
},
"database": {
"ok": true,
"detail": "Available"
}
}
}Endpoints
Every endpoint of the API guide, by group. The errors many endpoints share (400 for a body that does not pass its schema, 401 without a good token, 413 for a body over 1 MB, 500) are described under “Errors” and not repeated for each one.
Endpoints: Document to file in one call
The fastest way from JSON to a video file: render stores the document and starts the export. Poll the job, then download.
POST /api/render
Create a video and start exporting it.
- Endpoint id:
render - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
options is optional and takes everything listed under Export options; without aspect the video is exported in the shape of the document (its aspect), or 16:9 when it names none. The voice-over is recorded first when needed.
Request body (an example; "{ … }" stands for a value you fill in):
{
"spec": "{ … the document … }",
"options": {
"format": "mp4",
"aspect": "9:16",
"resolution": "1080p",
"fps": 30
}
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
spec | object | yes | The video document, as JSON. It is checked by the validator, which reports every problem with its path (see GET /api/schema and POST /api/validate). |
options | object | no | The export options. Every field is optional; leave it out for the defaults. Its fields are listed under “Export options”; a missing aspect is the document's own shape, as for an export of a stored video. |
Responses
| Status | Meaning |
|---|---|
202 | Accepted. Location points to the job. |
422 | The document has problems. |
Example of the 202 answer:
{
"video": "{ … }",
"job": {
"id": "75ae15a72b77b7b1",
"kind": "export",
"videoId": "b921df158655611f",
"status": "running",
"phase": "Drawing frames",
"progress": 0.42,
"options": {
"format": "mp4",
"aspect": "9:16",
"resolution": "1080p",
"fps": 30,
"quality": "standard",
"captions": true
},
"error": null,
"file": null,
"createdAt": "2026-10-12T21:38:44.157Z",
"startedAt": "2026-10-12T21:38:44.159Z",
"finishedAt": null
}
}Example
curl -X POST https://www.bana.video/api/render \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"spec": {
"title": "Why the sky is blue",
"domain": "science",
"scenes": [
{
"kind": "intro",
"say": [
"Why is the sky blue?",
"The answer is hiding in sunlight."
]
},
{
"kind": "statement",
"text": "Sunlight is made of **every colour** at once.",
"say": "Sunlight is made of every colour at once."
},
{
"kind": "statement",
"text": "Blue light scatters the **most**, so blue is the colour we see.",
"say": "Blue light scatters the most, so blue is the colour we see."
}
]
},
"options": {
"format": "mp4",
"aspect": "9:16",
"resolution": "1080p",
"fps": 30
}
}'GET /api/jobs/{id}
Follow a job.
- Endpoint id:
job - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
status is queued, running, done, failed or cancelled. progress goes from 0 to 1 and phase says what is happening. When done, file describes the result.
Responses
| Status | Meaning |
|---|---|
200 | The job. |
404 | No such job. |
Example of the 200 answer:
{
"job": {
"id": "75ae15a72b77b7b1",
"kind": "export",
"videoId": "b921df158655611f",
"status": "done",
"phase": "Done",
"progress": 1,
"options": {
"format": "mp4",
"aspect": "9:16",
"resolution": "1080p",
"fps": 30,
"quality": "standard",
"captions": true
},
"error": null,
"file": {
"name": "output.mp4",
"mime": "video/mp4",
"bytes": 5836270
},
"createdAt": "2026-10-12T21:38:44.157Z",
"startedAt": "2026-10-12T21:38:44.159Z",
"finishedAt": "2026-10-12T21:39:08.640Z"
}
}Example
curl https://www.bana.video/api/jobs/75ae15a72b77b7b1 \
-H "Authorization: Bearer $API_TOKEN"GET /api/jobs/{id}/download
Download the finished file.
- Endpoint id:
download - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Answers with a redirect to a short-lived address of the file in storage (which sends it as an attachment named after the video title, and supports Range requests), so follow redirects (curl -L). Answers 409 until the job is done.
Responses
| Status | Meaning |
|---|---|
307 | Redirect to the file. The address works for a few minutes; ask again for a new one. |
409 | The export is not finished. |
Example
curl -OJL https://www.bana.video/api/jobs/75ae15a72b77b7b1/download \
-H "Authorization: Bearer $API_TOKEN"Endpoints: Writing with the AI
Turn a topic, or a web page, into a video document, and compose the music under it. The result is checked by the validator, and repaired by the model when it has problems.
POST /api/sources
Read the words of a web page.
- Endpoint id:
sources - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Reads a public web page (or a plain text or Markdown file) and answers with its title and text, without the menus, footers and side panels: put text in source of POST /api/generate to base a video on the page. Only http and https addresses on the usual ports that lead to the public internet can be read: addresses on a private network, on this server or in a cloud metadata service are refused, also by redirect. The page may take up to 10 seconds to answer, and its first 3 MB are read. text has at most 20,000 characters; truncated says when the page had more. Pages that need a sign-in, build themselves in the browser, or are not text (PDF, images) cannot be read. No credit or token is used.
Request body (an example):
{
"url": "https://en.wikipedia.org/wiki/Photosynthesis"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | The address of a web page or a plain text file: an http(s) link to something public. Limits: up to 2000 characters. |
Responses
| Status | Meaning |
|---|---|
200 | The page, as source. |
400 | The address is not a web address, leads somewhere that cannot be read (a private network, a sign-in page), is not a page or a text file, or has hardly any words. |
502 | The page could not be reached, took too long, or answered with an error. |
Example of the 200 answer:
{
"source": {
"url": "https://en.wikipedia.org/wiki/Photosynthesis",
"title": "Photosynthesis",
"text": "Photosynthesis is the process by which …",
"truncated": true
}
}Example
curl -X POST https://www.bana.video/api/sources \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://en.wikipedia.org/wiki/Photosynthesis"
}'POST /api/generate
Write a video document from a topic.
- Endpoint id:
generate - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Only topic is required. format is the kind of video (explainer, lesson, howto, revision, quiz, pageguide, short, tips, story, travel, invite, memories, promo, demo, offer, review, casestudy, productad, socialad, appad, localad, eventad, training, update or pitch): it tells the writer what the video is for, and sets the shape, the length and the look unless you give them. aspect is the shape: 16:9 (default), 4:3, 1:1, 4:5, 3:4 or 9:16 for Shorts, Reels and TikTok; it is kept in the document, and the editor, the watch page, embeds and exports start from it. language is any narration language code (default en). length is 30s, 1m, 3m (the default), 5m or 10m; speed is the voice speed from 0.5 to 2 (default 1): it is set as narration.speed, and the script is sized so the video still runs for length. engine is the kind of voice-over: standard (default) is the voice server, and voice is who speaks (M1 to M5, F1 to F5; default F2), set as narration.voice; premium is Google Gemini 3.8 Flash TTS, directed by the writer: premium picks one of the 30 voices, a style, an accent and a pace (slow, natural or brisk; what you leave out the writer chooses to suit the topic), and every scene gets its own delivery. Put your own narration in script (up to 9,000 characters) and the video says exactly those words, in that order: the AI only divides it into scenes and designs the screen of each, so the length follows from the script and length is not needed (not together with source; topic can then be a short title). If the AI cannot keep every word, the answer still comes, with a warning first in warnings. Put an article, notes or a transcript in source and the script sticks to the facts in it (POST /api/sources reads a web page into that text). brand (a name and an optional tagline) is the brand the video is for: the writer names it where it fits, and it is set as brand (a logo you add yourself). With save: true the video is also stored and returned as video. pictures (up to 4) hands the AI pictures to work from, such as a photo of a whiteboard, a chart or a product shot: upload each one first (POST /api/assets?kind=image) and send its url as src. The AI reads what they show, and with show: true on a picture it also puts it in the video. For a tour of an app, the formats pageguide and demo take up to 10 pictures, one screenshot for each page in the order of the task, shows them all, and takes the file name each picture was uploaded with (X-File-Name) as the name of its page. The call can take up to a minute, a few minutes for a ten-minute video.
Request body (an example):
{
"topic": "How vaccines train the immune system",
"format": "explainer",
"description": "Explain it to teenagers. Include one quiz question.",
"audience": "teenagers",
"tone": "friendly",
"language": "en",
"length": "3m",
"aspect": "16:9",
"speed": 1,
"engine": "standard",
"voice": "F2",
"pictures": [
{
"src": "/api/assets/3c9d0e5a71b2f486",
"show": false
}
],
"save": true
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
topic | string | yes | What the video is about. With a script, a short title for it is enough. Limits: 3–200 characters. |
format | enum | no | The kind of video: explainer, lesson, howto, revision, quiz, pageguide, short, tips, story, travel, invite, memories, promo, demo, offer, review, casestudy, productad, socialad, appad, localad, eventad, training, update, pitch. It tells the writer what the video is for, and sets the shape and the length unless you give them. Allowed: explainer, lesson, howto, revision, quiz, pageguide, short, tips, story, travel, invite, memories, promo, demo, offer, review, casestudy, productad, socialad, appad, localad, eventad, training, update, pitch. |
description | string | no | Anything the script should cover, include or avoid. Limits: up to 2000 characters. |
source | string | no | Text to base the video on, such as an article, notes or a transcript. The script then uses only the facts in it. Limits: up to 20000 characters. |
script | string | no | Your own narration, up to 9000 characters. The AI divides it into scenes and designs the screen of each, and the video says every word of it, in order. The length of the video follows from it, so length is not needed. Not together with source. Limits: 1–9000 characters. |
pictures | object[] | no | Up to 4 pictures to base the video on, such as a photo, a screenshot, a chart or a page of notes (up to 10 for a pageguide or demo, which are told from screenshots and show them all). The AI looks at them, and what they show counts as source material. Set show on a picture to put it in the video as well. Limits: up to 10 items. |
pictures[].src | string | yes | The picture, by the address of a file of yours (/api/assets/<id>). Upload it with POST /api/assets?kind=image. |
pictures[].show | boolean | no | Also put the picture in the video, on the scene or scenes it suits. Without it the AI only looks at the picture, to work from what it shows. |
audience | string | no | Who will watch, e.g. complete beginners. Limits: up to 120 characters. |
tone | string | no | How it should sound, e.g. friendly, formal, energetic. Limits: up to 60 characters. |
language | enum | no | Language of the narration and of the text on screen. Allowed: en, ko, ja, ar, bg, cs, da, de, el, es, et, fi, fr, hi, hr, hu, id, it, lt, lv, nl, pl, pt, ro, ru, sk, sl, sv, tr, uk, vi, zh, th, he, ms, no, ur, ps, na. |
length | enum | no | How long the video should be: 30s, 1m, 3m, 5m or 10m. Default: the length of the format, or 3m. Allowed: 30s, 1m, 3m, 5m, 10m. |
aspect | enum | no | The shape of the video: 16:9 for screens, 9:16 for Shorts, Reels and TikTok, 1:1 or 4:5 for feeds. Default: the shape of the format, or 16:9. Allowed: 16:9, 4:3, 1:1, 4:5, 3:4, 9:16. |
speed | number | no | Speed of the standard voice, from 0.5 to 2 (the premium voice has its premium.pace instead). It is set as narration.speed, and the script is sized so the video still runs for length. Default 1. Limits: 0.5–2. |
engine | enum | no | standard (default) is the voice server. premium is Google Gemini 3.8 Flash TTS: the writer also directs it, giving every scene a delivery and the odd <sigh>-style tag. It is set as narration.engine. Allowed: standard, premium. |
voice | enum | no | The standard voice that speaks: M1 to M5 are male, F1 to F5 female. It is set as narration.voice. Default F2. Allowed: M1, M2, M3, M4, M5, F1, F2, F3, F4, F5. |
premium | object | no | The premium voice, when engine is premium: which of the 30 voices, its delivery, accent and pace. What you leave out the writer chooses to suit the topic. It is set as narration.premium. |
premium.voice | enum | no | One of 30 studio voices (see GET /api/catalog). Default Kore. Allowed: Zephyr, Puck, Charon, Kore, Fenrir, Leda, Orus, Aoede, Callirrhoe, Autonoe, Enceladus, Iapetus, Umbriel, Algieba, Despina, Erinome, Algenib, Rasalgethi, Laomedeia, Achernar, Alnilam, Schedar, Gacrux, Pulcherrima, Achird, Zubenelgenubi, Vindemiatrix, Sadachbia, Sadaltager, Sulafat. |
premium.style | string | no | How the whole video is delivered: emotion, energy, inflection. Short and concrete, e.g. "warm, confident, with a smile in the voice". Scenes can add to it with their own delivery. Limits: 1–160 characters. |
premium.accent | string | no | A regional accent or dialect as a soft hint, e.g. "British" or "Scottish". The voice keeps its own character; the model follows the hint most of the time. Limits: 1–40 characters. |
premium.pace | enum | no | How quickly the voice speaks. Default natural. Allowed: slow, natural, brisk. |
domain | enum | no | Forces the look of this topic area. By default the AI picks one. Allowed: general, finance, business, marketing, technology, ai, cybersecurity, education, science, kids, health, fitness, food, travel, nature, history, news, gaming, realestate, sports, legal, lifestyle, art, space, career, environment, automotive, music, celebration, mindfulness, mystery, pets. |
brand | object | no | The brand the video is for. The writer names it where it fits, and it is set as brand (add a logo to the video yourself). |
brand.name | string | yes | Limits: 1–32 characters. |
brand.tagline | string | no | Limits: 1–60 characters. |
save | boolean | no | Also store the result as a video. |
Responses
| Status | Meaning |
|---|---|
200 | The document, the model used and how many attempts it took. |
400 | A picture in pictures is not one of your files (any more). |
502 | The model could not produce a valid document. |
503 | No AI key is configured, or pictures were sent and the model in use cannot look at pictures. |
Example of the 200 answer:
{
"spec": "{ … }",
"warnings": [],
"attempts": 1,
"model": "anthropic/claude-haiku-5.5",
"tokens": {
"prompt": 5200,
"completion": 2400
},
"video": "{ … } or null"
}Example
curl -X POST https://www.bana.video/api/generate \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"topic": "How vaccines train the immune system",
"length": "30s",
"save": true
}'POST /api/revise
Change a document as asked, or translate it.
- Endpoint id:
revise - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Send the current document and an instruction in plain words ("make it shorter", "add a quiz before the end"), a language to translate the whole video into, or both. Add scene (counting from 0) to change only that scene: the editor's “Edit this scene with AI”. With a scene, annotations (up to 8) pin notes on its picture, as the editor does when you click on it: x and y say where (0 to 1 across and down the picture), note what to change there, and path and text (optional) which part of the scene is there (items[1].text) and the words on it, so that the AI knows what you mean. pictures (up to 4) hands the AI pictures to look at while it makes the change, such as a photo to use, a chart to copy or a sketch to follow: upload each one first (POST /api/assets?kind=image) and send its url as src; with show: true the AI also puts the picture in the video. Everything the change does not touch stays as it is. The result is checked and repaired like a new document, and it is not stored: send it to PUT /api/videos/{id} to keep it.
Request body (an example; "{ … }" stands for a value you fill in):
{
"spec": "{ … the current document … }",
"instruction": "Add a line about common mistakes",
"scene": 2,
"annotations": [
{
"note": "Say this more simply",
"x": 0.42,
"y": 0.31,
"path": "items[1].text",
"text": "Photosynthesis converts photons into sugar"
}
],
"pictures": [
{
"src": "/api/assets/3c9d0e5a71b2f486",
"show": false
}
]
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
spec | any | yes | The current video document. |
instruction | string | no | What to change, in plain words, e.g. make it shorter and add a quiz at the end. Limits: 3–1000 characters. |
language | enum | no | Translate the whole video into this language: the narration, the on-screen text and narration.lang. Allowed: en, ko, ja, ar, bg, cs, da, de, el, es, et, fi, fr, hi, hr, hu, id, it, lt, lv, nl, pl, pt, ro, ru, sk, sl, sv, tr, uk, vi, zh, th, he, ms, no, ur, ps. |
scene | integer | no | Change only this scene (counting from 0). Everything else stays as it is. Needs an instruction, or annotations. Limits: 0–9007199254740991. |
annotations | object[] | no | Notes pinned on the picture of the scene (at most 8), each saying what to change at one place on it. They point at the scene given as scene, which they need. Limits: up to 8 items. |
annotations[].note | string | yes | What to change at this place, in plain words. Limits: 1–300 characters. |
annotations[].x | number | yes | Where the note is across the picture of the scene: 0 is the left edge, 1 the right edge. Limits: 0–1. |
annotations[].y | number | yes | Where the note is down the picture of the scene: 0 is the top edge, 1 the bottom edge. Limits: 0–1. |
annotations[].path | string | no | The part of the scene the note is about, as a path into the scene (heading, items[1].text). Limits: up to 120 characters. |
annotations[].text | string | no | The words that stand at that place on the screen. Limits: up to 120 characters. |
pictures | object[] | no | Up to 4 pictures for the AI to look at while it makes the change, such as a photo to use, a chart to copy or a sketch to follow. Set show on a picture to put it in the video. Limits: up to 4 items. |
pictures[].src | string | yes | The picture, by the address of a file of yours (/api/assets/<id>). Upload it with POST /api/assets?kind=image. |
pictures[].show | boolean | no | Also put the picture in the video, on the scene or scenes it suits. Without it the AI only looks at the picture, to work from what it shows. |
Responses
| Status | Meaning |
|---|---|
200 | The changed document, in the shape of /api/generate without video. |
400 | Neither instruction, language nor annotations was given, or scene was combined with language, or has neither an instruction nor notes, or annotations has no scene; or a picture in pictures is not one of your files (any more). |
422 | The document you sent has problems. Fix them first. |
502 | The model could not produce a valid document. |
503 | No AI key is configured, or pictures were sent and the model in use cannot look at pictures. |
Example of the 200 answer:
{
"spec": "{ … }",
"warnings": [],
"attempts": 1,
"model": "anthropic/claude-haiku-5.5",
"tokens": {
"prompt": 9100,
"completion": 2600
}
}Example
curl -X POST https://www.bana.video/api/revise \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"spec": {
"title": "Why the sky is blue",
"domain": "science",
"scenes": [
{
"kind": "intro",
"say": [
"Why is the sky blue?",
"The answer is hiding in sunlight."
]
},
{
"kind": "statement",
"text": "Sunlight is made of **every colour** at once.",
"say": "Sunlight is made of every colour at once."
},
{
"kind": "statement",
"text": "Blue light scatters the **most**, so blue is the colour we see.",
"say": "Blue light scatters the most, so blue is the colour we see."
}
]
},
"instruction": "Add a scene about sunsets"
}'POST /api/publish
Write social post copy for a video.
- Endpoint id:
publish - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Send a video document and, optionally, which platforms to write for (youtube, tiktok, instagram, linkedin, x; default: all five). The AI writes titles and captions from the video's own words only. Nothing is stored.
Request body (an example):
{
"spec": {
"title": "Why the sky is blue",
"domain": "science",
"scenes": [
{
"kind": "intro",
"say": [
"Why is the sky blue?",
"The answer is hiding in sunlight."
]
},
{
"kind": "statement",
"text": "Sunlight is made of **every colour** at once.",
"say": "Sunlight is made of every colour at once."
},
{
"kind": "statement",
"text": "Blue light scatters the **most**, so blue is the colour we see.",
"say": "Blue light scatters the most, so blue is the colour we see."
}
]
},
"platforms": [
"youtube",
"linkedin"
]
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
spec | any | yes | The video document to promote. |
platforms | enum[] | no | Which networks to write for (default: all five). Allowed: youtube, tiktok, instagram, linkedin, x. Limits: at least 1 items. |
language | enum | no | Language of the posts; defaults to the video's narration language, or English. Allowed: en, ko, ja, ar, bg, cs, da, de, el, es, et, fi, fr, hi, hr, hu, id, it, lt, lv, nl, pl, pt, ro, ru, sk, sl, sv, tr, uk, vi, zh, th, he, ms, no, ur, ps. |
Responses
| Status | Meaning |
|---|---|
200 | Post copy per platform, plus model and tokens. |
422 | The document has problems. |
502 | The model did not return usable JSON. |
503 | No AI key is configured. |
Example of the 200 answer:
{
"platforms": {
"youtube": {
"title": "Why the sky is blue",
"body": "Sunlight hides every colour…",
"hashtags": [
"science",
"sky",
"learning"
]
}
},
"model": "anthropic/claude-haiku-5.5",
"tokens": {
"prompt": 900,
"completion": 400
}
}Example
curl -X POST https://www.bana.video/api/publish \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"spec": {
"title": "Why the sky is blue",
"domain": "science",
"scenes": [
{
"kind": "intro",
"say": [
"Why is the sky blue?",
"The answer is hiding in sunlight."
]
},
{
"kind": "statement",
"text": "Sunlight is made of **every colour** at once.",
"say": "Sunlight is made of every colour at once."
},
{
"kind": "statement",
"text": "Blue light scatters the **most**, so blue is the colour we see.",
"say": "Blue light scatters the most, so blue is the colour we see."
}
]
},
"platforms": [
"youtube",
"x"
]
}'POST /api/music
Compose music for a video.
- Endpoint id:
music - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
The AI composes an instrumental track, without vocals and kept quiet enough for a voice-over to sit on, and keeps it as an audio file of yours. mood is calm (default), uplifting, energetic, cinematic, playful, corporate, tense or chill; description adds your own words ("with a Spanish guitar"); length is clip (default: about 30 seconds, repeated under the video) or song (about 2 minutes, for longer videos). Set the url of the returned file as music.src of the document to use it. It takes 10 to 60 seconds, and counts as 50,000 (clip) or 100,000 (song) of your monthly AI tokens.
Request body (an example):
{
"mood": "uplifting",
"description": "with a light acoustic guitar",
"length": "clip"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
mood | enum | no | The feel of the music: calm, uplifting, energetic, cinematic, playful, corporate, tense or chill. Allowed: calm, uplifting, energetic, cinematic, playful, corporate, tense, chill. |
description | string | no | More about the music, e.g. with a Spanish guitar or slower. Limits: up to 300 characters. |
length | enum | no | clip: about 30 seconds, repeated under the video. song: about 2 minutes, for longer videos. Allowed: clip, song. |
Responses
| Status | Meaning |
|---|---|
200 | The track, as an audio file of yours. |
402 | Your plan has no AI tokens left this month. |
502 | The music generator failed or did not return a track. |
503 | No AI key is configured. |
Example of the 200 answer:
{
"asset": {
"id": "8d1f6a02c3b94e57",
"kind": "audio",
"name": "Uplifting music.mp3",
"url": "/api/assets/8d1f6a02c3b94e57",
"bytes": 481232,
"durationSeconds": 31.2,
"prompt": null,
"transparent": false,
"createdAt": "2026-10-16T09:12:40.031Z"
}
}Example
curl -X POST https://www.bana.video/api/music \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"mood": "uplifting",
"length": "clip"
}'Endpoints: Pictures with the AI
Paint pictures with the AI image model, or let an art director plan them for a whole video. Pictures are painted together on sprite sheets (a grid of up to 5 × 5 per request to the model), cut apart and kept as your images. Each picture that comes out costs one image credit; one that does not is free. Put a picture on a scene with the image field of the scene.
POST /api/images
Paint pictures on sprite sheets.
- Endpoint id:
images - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
images lists what to paint (up to 100). They are laid out on sheets of at most 25: 12 pictures make one 3 × 4 sheet, 30 make a 25 and a 5. Set grid (at most 5 × 5) to choose the grid, or square: true to keep it square (12 pictures then use a 4 × 4 sheet with 4 empty cells). maxPerSheet puts fewer pictures on each sheet, which makes them sharper (the editor uses 12). The model is asked to separate the cells with magenta dividers, and the pictures are cut along them: a sheet whose cells cannot be told apart is painted again (up to three tries), and a picture whose subject is cut off by the edge of its cell does not come out (and is not charged). style sets one look for all of them (photo, cinematic, illustration, 3d, isometric, watercolor, anime, pixel, sketch, paper, neon), aspect their shape. A picture with background green or black is painted as one subject on a flat screen of that colour, which is removed afterwards, so the result is transparent. The call can take a few minutes: ask for at most two sheets at a time.
Request body (an example):
{
"images": [
{
"id": "lighthouse",
"prompt": "A white lighthouse on a rocky coast at sunrise, waves below"
},
{
"id": "gull",
"prompt": "A seagull in flight, wings spread",
"background": "green"
}
],
"style": "photo",
"aspect": "16:9"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
images | object[] | yes | Limits: 1–100 items. |
images[].id | string | no | Names the picture in the answer. Default: its place in the list (0, 1 ...). Limits: 1–40 characters. |
images[].prompt | string | yes | What to paint, in plain words (English works best). Describe the subject, setting, composition and light; the look is set by style. Limits: 3–600 characters. |
images[].background | enum | no | scene (default): a full picture. green or black: one isolated subject on a flat screen of that colour, which is removed afterwards, so the result has a transparent background (use black for green subjects). Pictures of every kind share the same sheet. Allowed: scene, green, black. |
style | enum | no | The look of every picture. Default photo. Allowed: photo, cinematic, illustration, 3d, isometric, watercolor, anime, pixel, sketch, paper, neon. |
aspect | enum | no | The shape of one picture. Default 16:9. Allowed: 16:9, 4:3, 1:1, 4:5, 3:4, 9:16. |
grid | object | no | The grid of each sprite sheet, at most 5 × 5. Default: the grid that fits the pictures with the fewest empty cells (3 × 4 for 12 pictures). |
grid.cols | integer | yes | Pictures across. Limits: 1–5. |
grid.rows | integer | yes | Pictures down. Limits: 1–5. |
square | boolean | no | Use only square grids (2 × 2, 3 × 3 ...). Cells that are not needed stay empty: 12 pictures make a 4 × 4 sheet with 4 empty cells. |
maxPerSheet | integer | no | The most pictures on one sheet (up to 25). Fewer pictures per sheet are larger and sharper. Default 25. Limits: 1–25. |
Responses
| Status | Meaning |
|---|---|
200 | The pictures that came out (each is an image of yours, with its url), the ones that did not, the sheets and what was charged. |
400 | A field is not valid: a grid over 5 × 5, more than 100 pictures, a repeated id, or an unknown style. |
402 | Your plan has fewer image credits left than pictures asked for. Nothing is painted. |
503 | No AI key is configured. |
Example of the 200 answer:
{
"images": [
{
"id": "lighthouse",
"asset": {
"id": "3c9d0e5a71b2f486",
"kind": "image",
"name": "lighthouse.webp",
"url": "/api/assets/3c9d0e5a71b2f486",
"bytes": 182113,
"prompt": "A white lighthouse on a rocky coast at sunrise, waves below",
"transparent": false
}
}
],
"failed": [
{
"id": "gull",
"reason": "The model left this picture out."
}
],
"sheets": [
{
"grid": {
"cols": 2,
"rows": 1
},
"pictures": 2,
"background": "scene",
"ok": true,
"error": null
}
],
"model": "inclusionai/ming-image-0.1-design",
"costUsd": null,
"charged": 1,
"remaining": 99
}Example
curl -X POST https://www.bana.video/api/images \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"images": [
{
"id": "lighthouse",
"prompt": "A white lighthouse on a rocky coast at sunrise, waves below"
}
],
"style": "photo"
}'POST /api/images/plan
Plan the pictures of a video.
- Endpoint id:
images-plan - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
An art director reads the document and proposes which scenes get a picture, as a backdrop behind the scene, a transparent cutout beside the text, or a scene of its own, with a prompt for each and one look for the whole video. style is auto (default, the director chooses) or one of the looks above; amount is few, balanced (default) or lots. Nothing is painted and no image credit is used, only AI tokens; the plan never asks for more pictures than you have credits left. Paint it with POST /api/images, then set the image of each scene.
Request body (an example; "{ … }" stands for a value you fill in):
{
"spec": "{ … the document … }",
"style": "auto",
"amount": "balanced"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
spec | any | yes | The video document to illustrate. |
style | enum | no | The look of the pictures. auto (default) lets the AI art director choose one that suits the topic. Allowed: auto, photo, cinematic, illustration, 3d, isometric, watercolor, anime, pixel, sketch, paper, neon. |
amount | enum | no | How many scenes get a picture: few (about one in four), balanced (about one in two, default) or lots (nearly all). Allowed: few, balanced, lots. |
Responses
| Status | Meaning |
|---|---|
200 | The plan, the credits left and the model used. |
409 | Every scene has a picture already. |
422 | The document has problems. |
402 | No image credits are left this month. |
503 | No AI key is configured. |
Example of the 200 answer:
{
"plan": {
"style": "photo",
"pictures": "{ … one per scene that gets a picture … }"
},
"remaining": 100,
"model": "anthropic/claude-haiku-5.5",
"tokens": {
"prompt": 4100,
"completion": 900
}
}Example
curl -X POST https://www.bana.video/api/images/plan \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"spec": {
"title": "Why the sky is blue",
"domain": "science",
"scenes": [
{
"kind": "intro",
"say": [
"Why is the sky blue?",
"The answer is hiding in sunlight."
]
},
{
"kind": "statement",
"text": "Sunlight is made of **every colour** at once.",
"say": "Sunlight is made of every colour at once."
},
{
"kind": "statement",
"text": "Blue light scatters the **most**, so blue is the colour we see.",
"say": "Blue light scatters the most, so blue is the colour we see."
}
]
},
"amount": "balanced"
}'GET /api/assets
List your pictures, recordings or clips.
- Endpoint id:
assets-list - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
The newest first. kind is image (default), audio or video (footage for clip scenes); limit is 1 to 100 (default 60). Or give ids, up to 100 file ids separated by commas, to get exactly those files whatever their kind (the ones a video uses, however old; an id that is not yours is left out). Pictures painted by the AI carry the prompt they were made from, and transparent is true for a cut-out.
Query parameters and headers
| Field | Type | Required | Description |
|---|---|---|---|
kind | enum | no | Which files. Default image; video is footage for clip scenes. Allowed: audio, image, video. |
limit | integer | no | How many, newest first. Default 60. Limits: 1–100. |
ids | string | no | Instead of kind and limit: the ids of the files to get, separated by commas, of whatever kind. An id that is not yours is left out. Limits: up to 100 ids. |
Responses
| Status | Meaning |
|---|---|
200 | { assets: [ … ] }, in the shape of an uploaded file. |
Example
curl https://www.bana.video/api/assets?kind=image&limit=20 \
-H "Authorization: Bearer $API_TOKEN"GET /api/usage
Your plan and what is left of this month.
- Endpoint id:
usage - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
The allowance of every kind (video, ai_tokens, image, export, voiceover, premium_voice): its limit, what is used and what is remaining, and when the month starts over. premium_voice is counted in seconds (the Free plan has 180), the rest in pieces.
Responses
| Status | Meaning |
|---|---|
200 | { summary }, as shown on the Usage page. |
Example
curl https://www.bana.video/api/usage \
-H "Authorization: Bearer $API_TOKEN"Endpoints: Product ads
Make a video ad for a product, an app or a business, in three calls that can be used on their own: read the website for the facts, read and prepare the logo and pictures, then compose the ad. The composer chooses and orders the scenes, places the pictures, and dresses the video in the brand's colour; the AI only writes the words, from the facts you give it. Save the result with save: true or send spec to POST /api/videos, then edit it like any other video.
POST /api/product/crawl
Find out about a product from its web page.
- Endpoint id:
product-crawl - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Reads the page (and up to two pages of the same site that tell more: pricing, features, about) and answers with a brief to check and complete, the pictures it found, and notes on what is missing. The page's own data comes first (structured data, Open Graph tags, the browser colour); when the AI is set up it also reads the words of the page, and only what the page backs up is kept: a number the page does not contain, or a quote that is not on it word for word, is dropped. A rating is only taken from the page's structured data, never from the AI. A site's robots.txt is respected (this crawler is called videobana): a page it asks robots to keep away from is refused. Only http and https addresses that lead to the public internet can be read. It uses a little of your AI tokens, and no credit.
Request body (an example):
{
"url": "https://aurora.audio/one"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | The address of a public page about the product: its own page, or the home page of the business or app. Limits: up to 2000 characters. |
Responses
| Status | Meaning |
|---|---|
200 | What the page says, as a brief; the pictures found, each marked as the page's logo or one of its images; where the facts came from (found); what could not be found (notes); and whether the AI read the words (ai). |
400 | The address is not a web address, leads somewhere that cannot be read, is not a page, or the site asks robots not to read it. |
502 | The page could not be reached, took too long, or answered with an error. |
Example of the 200 answer:
{
"url": "https://aurora.audio/one",
"brief": {
"name": "Aurora One",
"kind": "product",
"tagline": "Wireless headphones that disappear.",
"features": [
{
"title": "40-hour battery"
},
{
"title": "Active noise cancelling"
}
],
"price": {
"now": "$249"
},
"cta": {
"link": "aurora.audio"
},
"website": "https://aurora.audio/one"
},
"images": [
{
"url": "https://aurora.audio/logo.svg",
"hint": "logo"
},
{
"url": "https://aurora.audio/img/front.jpg",
"hint": "image"
}
],
"found": [
"structured data",
"price",
"logo",
"pictures",
"features (from the words of the page)"
],
"notes": [],
"ai": true
}Example
curl -X POST https://www.bana.video/api/product/crawl \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://aurora.audio/one"
}'POST /api/product/pictures
Read the logo and pictures of a product.
- Endpoint id:
product-pictures - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Takes up to 8 sources, each the url of a picture on the web (copied into your files, at most 8 MB) or the src of a picture of yours (POST /api/assets?kind=image). Each is read for what it is (logo, product, screenshot or photo: give role when you know, or hint with what the page called it: a picture the page shows as one of its images is never taken for a logo), whether it is see-through, where the subject is, its main colours and how light it is. A logo or product on a flat background is cut out of it so it can float on the stage (cutOut: false to keep it whole), and the cut-out is kept as a new file; an SVG logo is drawn as a picture, and refused when it loads other files. Give the product's features (in order) and, with understand on (the default), the AI also looks at the main product picture, says what it shows and where each feature is, so the video can point at it. The pictures come back in the order sent, with a note for any that could not be used; every src returned is a file of yours.
Request body (an example):
{
"sources": [
{
"url": "https://aurora.audio/logo.svg",
"hint": "logo"
},
{
"url": "https://aurora.audio/img/front.jpg",
"hint": "image"
}
],
"features": [
"40-hour battery",
"Active noise cancelling"
],
"cutOut": true,
"understand": true
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
sources | object[] | yes | Limits: 1–8 items. |
sources[].url | string | no | A picture on the web. It is copied into your files. Limits: up to 2000 characters. |
sources[].src | string | no | A picture of yours (/api/assets/<id>), from POST /api/assets?kind=image. |
sources[].role | enum | no | What the picture is, when you know. Otherwise it is worked out from the picture. Allowed: logo, product, screenshot, photo. |
sources[].hint | enum | no | What the page the picture comes from calls it: its logo, or one of its images (never taken for a logo). Used when role is not given. Allowed: logo, image. |
features | string[] | no | The features of the product, in order. The AI looks for where each one is on the product picture, so the video can point at them. Limits: up to 5 items, each 1–48 characters. |
cutOut | boolean | no | Cut a product or logo out of a flat background, so that it floats on the stage. |
understand | boolean | no | Let the AI look at the pictures: what they show, and where the features are. Costs a little of the AI allowance. |
Responses
| Status | Meaning |
|---|---|
200 | pictures (each with the src to use, its name, where it was copied from, its analysis and whether its background was cut away) and notes. Change an analysis.role before composing to tell the composer what a picture is. |
400 | None of the pictures could be used (the notes say why), or a src is not one of your files (any more). |
Example of the 200 answer:
{
"pictures": [
{
"src": "/api/assets/5b1e07a3c9d24f68",
"name": "front.webp",
"source": "https://aurora.audio/img/front.jpg",
"analysis": {
"width": 1600,
"height": 1600,
"transparent": true,
"plainBackground": true,
"subject": {
"x": 8,
"y": 20,
"width": 84,
"height": 60
},
"colors": [
{
"hex": "#282828",
"share": 0.61
}
],
"brightness": 0.39,
"role": "product",
"description": "Black over-ear headphones on a plain background"
},
"cutOut": true
}
],
"notes": []
}Example
curl -X POST https://www.bana.video/api/product/pictures \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"sources": [
{
"url": "https://aurora.audio/img/front.jpg",
"hint": "image"
}
],
"features": [
"40-hour battery",
"Active noise cancelling"
]
}'POST /api/product/compose
Compose a video ad from a brief and its pictures.
- Endpoint id:
product-compose - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Only brief.name is required; every other fact is optional, and a part of the ad that the facts cannot support is left out (and listed in plan.skipped, with what would have helped in plan.missing) instead of being made up. brief holds the name, kind (product, app or service), category (the sort of business: it picks the usual recipe and look), tagline, description, problem, features, benefits, steps, lineup (up to 6 things sold, each with a name, a line, a price, a tag and a picture of yours: with pictures they become a gallery, with prices a price list), specs (up to 6 key facts, each a label and a value), integrations (up to 8: what it works with), event (a title, a date with day and month, and a time, place, host and up to 3 perks), price, offer, rating, badges, testimonials (up to 6), cta, stores, website, brandColor and language. Prices, ratings and numbers are shown exactly as given: the ad never works one out. pictures are those returned by POST /api/product/pictures. recipe is the shape of the ad (launch, scroll-stopper, spotlight, app-demo, flash-sale, before-after, service-intro, social-proof, catalog, menu-special, listing, event-promo, saas-pitch, local-service, course, wall-of-love): by default the one that fits the brief and pictures best. aspect, length (15s to 60s: the least important parts are left out to fit), voice (one of the 30 premium voices: an ad is always narrated by the premium voice, and by default it is cast to suit the business) and theme override the recipe's. The colours of the video follow brief.brandColor, else the strongest colour of the logo (useBrandColor: false keeps the look of the theme). When the AI is set up it writes the words in the language of the brief; every line is checked against the brief, and one that states a number or a claim you did not give is replaced by a line made from the facts (copy.rejected lists them). Without the AI, or when it fails, the words are made from the facts in English (with a warning for another language). With save: true the video is also stored and returned as video.
Request body (an example; "{ … }" stands for a value you fill in):
{
"brief": {
"name": "Aurora One",
"kind": "product",
"tagline": "Wireless headphones that disappear.",
"features": [
{
"title": "40-hour battery"
},
{
"title": "Active noise cancelling"
}
],
"benefits": [
"Comfortable all day"
],
"price": {
"now": "$249",
"was": "$299"
},
"cta": {
"button": "Shop now",
"link": "aurora.audio"
},
"brandColor": "#0d9488"
},
"pictures": [
{
"src": "/api/assets/5b1e07a3c9d24f68",
"analysis": "{ … as returned by /api/product/pictures … }"
}
],
"recipe": "launch",
"length": "30s",
"save": true
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
brief | object | yes | |
brief.name | string | yes | The product, app or business name, as it should appear. Limits: 1–32 characters. |
brief.kind | enum | no | What is being advertised. It decides the wording and which scenes fit. Allowed: product, app, service. |
brief.category | enum | no | What sort of business it is. It decides the look of the ad and the shape that suits it. Default: from the kind. Allowed: tech, beauty, fashion, food, restaurant, home, health, fitness, travel, property, event, finance, education, local, software. |
brief.tagline | string | no | The slogan, if there is one. Limits: 1–60 characters. |
brief.description | string | no | What it is and who it is for, in a few sentences. Limits: up to 600 characters. |
brief.problem | string | no | The pain it removes, as a short question or statement: Tired of tangled cables?. Opens the ad. Limits: 1–48 characters. |
brief.features | object[] | no | What it has or does. The first ones count most. Limits: 0–5 items. |
brief.features[].title | string | yes | A few words. Limits: 1–48 characters. |
brief.features[].text | string | no | One line of detail. Limits: 1–150 characters. |
brief.benefits | string[] | no | What the customer gets out of it. Limits: 0–4 items, each 1–60 characters. |
brief.steps | object[] | no | How it works, in order, for a service or an app. Limits: 0–4 items. |
brief.steps[].title | string | yes | A few words. Limits: 1–48 characters. |
brief.steps[].text | string | no | One line of detail. Limits: 1–150 characters. |
brief.lineup | object[] | no | Products, dishes, rooms or packages. With pictures they become a gallery, with prices a price list. Limits: 0–6 items. |
brief.lineup[].name | string | yes | Limits: 1–32 characters. |
brief.lineup[].text | string | no | What it is, in a few words. Limits: 1–60 characters. |
brief.lineup[].price | string | no | Its price, as written: $12, from €30. Limits: 1–14 characters. |
brief.lineup[].tag | string | no | A small label: New, Vegan. Limits: 1–16 characters. |
brief.lineup[].picture | string | no | A picture of this one, as the address of an uploaded picture. |
brief.specs | object[] | no | Facts bought by their numbers: capacity, size, battery life, duration. Limits: 0–6 items. |
brief.specs[].label | string | yes | Limits: 1–24 characters. |
brief.specs[].value | string | yes | The figure as written: 40 h, 3 beds. Limits: 1–16 characters. |
brief.specs[].note | string | no | Limits: 1–40 characters. |
brief.integrations | object[] | no | What it works with or is made of: the tools it connects to, its ingredients, the pillars of the service. Limits: 0–8 items. |
brief.integrations[].name | string | yes | Limits: 1–24 characters. |
brief.integrations[].text | string | no | Limits: 1–48 characters. |
brief.integrations[].icon | string | no | An emoji. Default: a link. Limits: 1–8 characters. |
brief.event | object | no | A dated event: an opening, a launch party, a class, a sale day. |
brief.event.title | string | yes | What the event is: Grand opening. Limits: 1–60 characters. |
brief.event.date | object | yes | |
brief.event.date.day | string | yes | The day of the month: 14. Limits: 1–4 characters. |
brief.event.date.month | string | yes | NOV or November. Limits: 1–10 characters. |
brief.event.date.weekday | string | no | Limits: 1–12 characters. |
brief.event.date.year | string | no | Limits: 1–6 characters. |
brief.event.time | string | no | Limits: 1–24 characters. |
brief.event.place | string | no | Limits: 1–40 characters. |
brief.event.host | string | no | Limits: 1–40 characters. |
brief.event.perks | string[] | no | Why to come: Free entry, Live music. Limits: 0–3 items, each 1–28 characters. |
brief.price | object | no | |
brief.price.now | string | yes | The price to pay, as written: $49, €9.90, From $9. Limits: 1–14 characters. |
brief.price.was | string | no | The old price, shown struck through. Limits: 1–14 characters. |
brief.price.period | string | no | What the price covers: /month, per box. Limits: 1–12 characters. |
brief.offer | object | no | |
brief.offer.title | string | yes | What the offer is: Launch week sale. Limits: 1–60 characters. |
brief.offer.badge | string | no | The headline number: -20%, FREE. Limits: 1–12 characters. |
brief.offer.code | string | no | Limits: 1–16 characters. |
brief.offer.ends | string | no | The deadline: Ends Sunday. Limits: 1–32 characters. |
brief.offer.perks | string[] | no | Limits: 0–3 items, each 1–40 characters. |
brief.rating | object | no | Only a real rating. Never made up. |
brief.rating.value | number | yes | Limits: 0–5. |
brief.rating.count | string | yes | 12,400 reviews. Limits: 1–24 characters. |
brief.rating.source | string | no | Limits: 1–24 characters. |
brief.badges | string[] | no | Real reasons to trust it: Free returns, Award winner. Limits: 0–4 items, each 1–28 characters. |
brief.testimonials | object[] | no | Real customer quotes only. Limits: 0–6 items. |
brief.testimonials[].quote | string | yes | Limits: 1–150 characters. |
brief.testimonials[].name | string | yes | Limits: 1–32 characters. |
brief.testimonials[].role | string | no | Limits: 1–40 characters. |
brief.cta | object | no | |
brief.cta.button | string | no | The label of the button: Shop now. Default: from the kind. Limits: 1–24 characters. |
brief.cta.link | string | no | The address to visit, as it is read out: aurora.audio/one. Limits: 1–48 characters. |
brief.stores | string[] | no | Where to get it: App Store, Google Play. Limits: 0–3 items, each 1–20 characters. |
brief.website | string | no | Limits: up to 2000 characters. |
brief.brandColor | string | no | The main colour of the brand. The video builds its palette around it. Limits: hex colour such as #7c3aed. |
brief.logo | string | no | The logo, as the address of an uploaded picture. |
brief.language | enum | no | The language of the narration and of the text on screen. Allowed: en, ko, ja, ar, bg, cs, da, de, el, es, et, fi, fr, hi, hr, hu, id, it, lt, lv, nl, pl, pt, ro, ru, sk, sl, sv, tr, uk, vi, zh, th, he, ms, no, ur, ps, na. |
pictures | object[] | no | The pictures as returned by POST /api/product/pictures. Change an analysis.role to tell the composer what a picture is. Limits: up to 8 items. |
pictures[].src | string | yes | |
pictures[].analysis | object | yes | |
pictures[].analysis.width | integer | yes | Limits: 1–9007199254740991. |
pictures[].analysis.height | integer | yes | Limits: 1–9007199254740991. |
pictures[].analysis.transparent | boolean | yes | |
pictures[].analysis.plainBackground | boolean | yes | |
pictures[].analysis.background | string | no | Limits: hex colour such as #7c3aed. |
pictures[].analysis.subject | object | yes | |
pictures[].analysis.subject.x | number | yes | Limits: 0–100. |
pictures[].analysis.subject.y | number | yes | Limits: 0–100. |
pictures[].analysis.subject.width | number | yes | Limits: 0–100. |
pictures[].analysis.subject.height | number | yes | Limits: 0–100. |
pictures[].analysis.colors | object[] | yes | Limits: up to 5 items. |
pictures[].analysis.colors[].hex | string | yes | Limits: hex colour such as #7c3aed. |
pictures[].analysis.colors[].share | number | yes | Limits: 0–1. |
pictures[].analysis.brightness | number | yes | Limits: 0–1. |
pictures[].analysis.role | enum | yes | Allowed: logo, product, screenshot, photo. |
pictures[].analysis.description | string | no | Limits: 1–150 characters. |
pictures[].analysis.hotspots | object[] | no | Limits: up to 5 items. |
pictures[].analysis.hotspots[].feature | integer | yes | Limits: 0–4. |
pictures[].analysis.hotspots[].at | object | yes | |
pictures[].analysis.hotspots[].at.x | number | yes | Limits: 0–100. |
pictures[].analysis.hotspots[].at.y | number | yes | Limits: 0–100. |
pictures[].analysis.hotspots[].at.width | number | yes | Limits: 0–100. |
pictures[].analysis.hotspots[].at.height | number | yes | Limits: 0–100. |
recipe | enum | no | The shape of the ad: launch, scroll-stopper, spotlight, app-demo, flash-sale, before-after, service-intro, social-proof, catalog, menu-special, listing, event-promo, saas-pitch, local-service, course, wall-of-love. Default: the one that fits the brief best. Allowed: launch, scroll-stopper, spotlight, app-demo, flash-sale, before-after, service-intro, social-proof, catalog, menu-special, listing, event-promo, saas-pitch, local-service, course, wall-of-love. |
aspect | enum | no | The shape of the video. Default: the recipe's. Allowed: 16:9, 4:3, 1:1, 4:5, 3:4, 9:16. |
length | enum | no | The most the ad should run: 15s, 30s, 45s or 60s. The least important parts are left out to fit. Default: the recipe's. Allowed: 15s, 30s, 45s, 60s. |
voice | enum | no | An ad is always narrated by the premium voice (Google Gemini TTS). By default it is cast to suit the business: the voice, how it feels, the pace and the delivery of every part of the ad. Set one of the 30 premium voices to choose who speaks; the delivery is still directed to suit the business. Allowed: Zephyr, Puck, Charon, Kore, Fenrir, Leda, Orus, Aoede, Callirrhoe, Autonoe, Enceladus, Iapetus, Umbriel, Algieba, Despina, Erinome, Algenib, Rasalgethi, Laomedeia, Achernar, Alnilam, Schedar, Gacrux, Pulcherrima, Achird, Zubenelgenubi, Vindemiatrix, Sadachbia, Sadaltager, Sulafat. |
theme | enum | no | A look other than the recipe's. Allowed: neon-nights, paper-press, kids-fun, boardroom, arcade, ocean-calm, golden-hour, midnight-tech, newsroom, chalkboard-class, blueprint-lab, cinema, sunny-pop, forest-walk, cotton-candy, minimal-ink, galaxy-quest, retro-tv, terracotta-studio, volcanic, springtime, gold-luxe, showroom, launch-night, flash-sale, fresh-glow, app-glass, saas-light, platform-night, product-calm, product-night, organic-market, kitchen-table, bold-street, clinic-calm, fintech-pro, estate-classic, festival-pop, sunset-escape, edu-bright. |
useBrandColor | boolean | no | Build the colours of the video around the colour of the brand (the brief's brandColor, else the logo's). |
save | boolean | no | Also store the result as a video. |
Responses
| Status | Meaning |
|---|---|
200 | The document (spec), what was made and what was left out (plan), where the words came from (copy), problems found by the validator (warnings) and the stored video or null. |
400 | The brief or a picture is not valid, or a picture is not one of your files. |
402 | Your plan has no AI tokens left this month (or no video left, with save). |
422 | The composed document has problems. This should not happen: please report it with your request. |
Example of the 200 answer:
{
"spec": "{ … }",
"plan": {
"recipe": "launch",
"aspect": "16:9",
"seconds": 28.4,
"budget": 30,
"scenes": [
{
"slot": "hook",
"kind": "kinetic"
}
],
"skipped": [
{
"slot": "offer",
"reason": "there is no offer"
}
],
"shortened": false,
"missing": [
"offer"
],
"brandColor": "#0d9488",
"unusedPictures": []
},
"copy": {
"source": "ai",
"language": "en",
"rejected": []
},
"warnings": [],
"video": "{ … } or null"
}Example
curl -X POST https://www.bana.video/api/product/compose \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"brief": {
"name": "Aurora One",
"kind": "product",
"features": [
{
"title": "40-hour battery"
},
{
"title": "Active noise cancelling"
}
],
"price": {
"now": "$249"
}
},
"recipe": "launch",
"length": "30s"
}'POST /api/product/pack
Compose one video ad for each place it will run.
- Endpoint id:
product-pack - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
The same brief and pictures as POST /api/product/compose, for every place the ad will run: placements lists them (at least one of tiktok, reels, shorts, feed, square, youtube and website) and one ad is made for each, in the shape that suits it (9:16, 4:5, 1:1 or 16:9), at the length that suits it (15 seconds for tiktok, 30 for the other social places and youtube, 45 for website; length sets the most for all of them) and, for the vertical places, with the titles and the logo kept clear of the buttons of the app. It is not one video resized: each is composed for its place. The words are written once, for the longest ad, so the message is the same everywhere, and the shorter ads leave out the parts that do not fit. recipe, voice, theme, useBrandColor and save work as they do for compose (aspect is not taken: the place decides it); with save: true every ad is also stored as a video. Each ad comes with an audit: the check a media buyer would make, made of rules and not of a model, so the same ad always gets the same answer. It has checks (hook, brand, next-step, platform, length, content, proof, offer, claims and language), each with a status (pass, tip for what would make the ad stronger, warn for what makes it work less well, or fail for what will get it turned down), a detail in plain words and, where there is a remedy, a fix: { kind: "add", fact } for a fact the brief does not have, or { kind: "length", length } for another length (make that one ad again with POST /api/product/pack and a single place). It also has a verdict (ready, nearly or needs-work) and how many checks passed out of total. The claims check looks for phrases that ad platforms turn down or want a source for (a cure, guaranteed returns, an absolute promise, a "number one"), in English. The ads come back in the order the places are listed above, whatever order they were asked for in.
Request body (an example; "{ … }" stands for a value you fill in):
{
"brief": {
"name": "Casa Luna",
"kind": "service",
"category": "restaurant",
"tagline": "Wood-fired, made to share",
"lineup": [
{
"name": "Margherita",
"price": "$14"
},
{
"name": "Tagliatelle al ragù",
"price": "$17"
},
{
"name": "Tiramisu",
"price": "$8"
}
],
"cta": {
"button": "Book a table",
"link": "casaluna.example/book"
}
},
"pictures": [
{
"src": "/api/assets/5b1e07a3c9d24f68",
"analysis": "{ … as returned by /api/product/pictures … }"
}
],
"placements": [
"reels",
"feed",
"youtube"
]
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
brief | object | yes | Its fields are the same as in the request body of POST /api/product/compose (listed there). |
pictures | object[] | no | The pictures as returned by POST /api/product/pictures. Change an analysis.role to tell the composer what a picture is. Its fields are the same as in the request body of POST /api/product/compose (listed there). Limits: up to 8 items. |
recipe | enum | no | The shape of the ad: launch, scroll-stopper, spotlight, app-demo, flash-sale, before-after, service-intro, social-proof, catalog, menu-special, listing, event-promo, saas-pitch, local-service, course, wall-of-love. Default: the one that fits the brief best. Allowed: launch, scroll-stopper, spotlight, app-demo, flash-sale, before-after, service-intro, social-proof, catalog, menu-special, listing, event-promo, saas-pitch, local-service, course, wall-of-love. |
length | enum | no | The most each ad should run: 15s, 30s, 45s or 60s. Default: the length that suits each placement. Allowed: 15s, 30s, 45s, 60s. |
voice | enum | no | An ad is always narrated by the premium voice (Google Gemini TTS). By default it is cast to suit the business: the voice, how it feels, the pace and the delivery of every part of the ad. Set one of the 30 premium voices to choose who speaks; the delivery is still directed to suit the business. Allowed: Zephyr, Puck, Charon, Kore, Fenrir, Leda, Orus, Aoede, Callirrhoe, Autonoe, Enceladus, Iapetus, Umbriel, Algieba, Despina, Erinome, Algenib, Rasalgethi, Laomedeia, Achernar, Alnilam, Schedar, Gacrux, Pulcherrima, Achird, Zubenelgenubi, Vindemiatrix, Sadachbia, Sadaltager, Sulafat. |
theme | enum | no | A look other than the recipe's. Allowed: neon-nights, paper-press, kids-fun, boardroom, arcade, ocean-calm, golden-hour, midnight-tech, newsroom, chalkboard-class, blueprint-lab, cinema, sunny-pop, forest-walk, cotton-candy, minimal-ink, galaxy-quest, retro-tv, terracotta-studio, volcanic, springtime, gold-luxe, showroom, launch-night, flash-sale, fresh-glow, app-glass, saas-light, platform-night, product-calm, product-night, organic-market, kitchen-table, bold-street, clinic-calm, fintech-pro, estate-classic, festival-pop, sunset-escape, edu-bright. |
useBrandColor | boolean | no | Build the colours of the video around the colour of the brand (the brief's brandColor, else the logo's). |
save | boolean | no | Also store the result as a video. |
placements | enum[] | yes | Where the ads will run: tiktok, reels, shorts, feed, square, youtube, website. Each one gets an ad of the shape, the length and the safe zone that suit it. Allowed: tiktok, reels, shorts, feed, square, youtube, website. Limits: 1–7 items. |
Responses
| Status | Meaning |
|---|---|
200 | ads: for each place, its placement, its result (what compose answers: the document, the plan, where the words came from, the warnings and the stored video or null) and its audit. |
400 | The brief or a picture is not valid, placements is empty or names a place that does not exist, or a picture is not one of your files. |
402 | Your plan has no AI tokens left this month (or no videos left, with save). |
422 | An ad that was composed has problems. This should not happen: please report it with your request. |
Example of the 200 answer:
{
"ads": [
{
"placement": "reels",
"result": "{ … as /api/product/compose answers … }",
"audit": {
"verdict": "nearly",
"passed": 5,
"total": 9,
"checks": [
{
"id": "hook",
"label": "Hook",
"status": "warn",
"detail": "The hook was left out to keep the ad within 30 seconds, so it opens on \"Product on stage\"."
},
{
"id": "content",
"label": "Content",
"status": "tip",
"detail": "Left out to keep the ad within 30 seconds: Hook. Instagram Reels works best under 30 seconds, so it is your call.",
"fix": {
"kind": "length",
"length": "45s"
}
},
{
"id": "next-step",
"label": "Next step",
"status": "pass",
"detail": "The end card says where to go: casaluna.example/book."
}
]
}
}
]
}Example
curl -X POST https://www.bana.video/api/product/pack \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"brief": {
"name": "Casa Luna",
"kind": "service",
"category": "restaurant",
"cta": {
"button": "Book a table",
"link": "casaluna.example/book"
}
},
"placements": [
"reels",
"youtube"
]
}'Endpoints: Videos
Stored videos: a document, its voice-over and its exports. Ids are 16 hexadecimal characters.
POST /api/validate
Check a document without storing it.
- Endpoint id:
validate - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
Returns every error and warning with its path and often a hint, plus stats for a valid document.
Request body (an example; "{ … }" stands for a value you fill in):
{
"spec": "{ … the document … }"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
spec | object | yes | The video document, as JSON. It is checked by the validator, which reports every problem with its path (see GET /api/schema and POST /api/validate). |
Responses
| Status | Meaning |
|---|---|
200 | Always 200; read valid. |
Example of the 200 answer:
{
"valid": true,
"errors": [],
"warnings": [
{
"level": "warning",
"path": "scenes[0]",
"message": "The video starts without a title card.",
"hint": "Start with { \"kind\": \"intro\", ... }"
}
],
"stats": {
"scenes": 3,
"sentences": 4,
"words": 38,
"estimatedSeconds": 21
}
}Example
curl -X POST https://www.bana.video/api/validate \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"spec": {
"title": "Why the sky is blue",
"domain": "science",
"scenes": [
{
"kind": "intro",
"say": [
"Why is the sky blue?",
"The answer is hiding in sunlight."
]
},
{
"kind": "statement",
"text": "Sunlight is made of **every colour** at once.",
"say": "Sunlight is made of every colour at once."
},
{
"kind": "statement",
"text": "Blue light scatters the **most**, so blue is the colour we see.",
"say": "Blue light scatters the most, so blue is the colour we see."
}
]
}
}'POST /api/videos
Store a video.
- Endpoint id:
videos-create - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Request body (an example; "{ … }" stands for a value you fill in):
{
"spec": "{ … the document … }"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
spec | object | yes | The video document, as JSON. It is checked by the validator, which reports every problem with its path (see GET /api/schema and POST /api/validate). |
Responses
| Status | Meaning |
|---|---|
201 | Created. Location points to the video. |
422 | The document has problems. |
Example of the 201 answer:
{
"video": {
"id": "b921df158655611f",
"title": "Why the sky is blue",
"domain": "science",
"scenes": 3,
"durationSeconds": 21.4,
"look": {
"colors": [
"#06283d",
"#0e7490",
"#4338ca"
],
"emoji": "🌧️"
},
"visibility": "private",
"createdAt": "2026-10-12T21:35:31.303Z",
"updatedAt": "2026-10-12T21:35:31.303Z",
"narration": {
"status": "missing",
"durationSeconds": null
},
"spec": "{ … the document … }"
}
}Example
curl -X POST https://www.bana.video/api/videos \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"spec": {
"title": "Why the sky is blue",
"domain": "science",
"scenes": [
{
"kind": "intro",
"say": [
"Why is the sky blue?",
"The answer is hiding in sunlight."
]
},
{
"kind": "statement",
"text": "Sunlight is made of **every colour** at once.",
"say": "Sunlight is made of every colour at once."
},
{
"kind": "statement",
"text": "Blue light scatters the **most**, so blue is the colour we see.",
"say": "Blue light scatters the most, so blue is the colour we see."
}
]
}
}'GET /api/videos
List videos, newest first.
- Endpoint id:
videos-list - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Responses
| Status | Meaning |
|---|---|
200 | Light summaries, without documents. |
Example of the 200 answer:
{
"videos": [
{
"id": "b921df158655611f",
"title": "Why the sky is blue",
"domain": "science",
"scenes": 3,
"durationSeconds": 21.4,
"look": {
"colors": [
"#06283d",
"#0e7490",
"#4338ca"
],
"emoji": "🌧️"
},
"visibility": "private",
"createdAt": "2026-10-12T21:35:31.303Z",
"updatedAt": "2026-10-12T21:35:31.303Z"
}
]
}Example
curl https://www.bana.video/api/videos \
-H "Authorization: Bearer $API_TOKEN"GET /api/videos/{id}
Read a video with its document.
- Endpoint id:
videos-get - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
narration.status is silent, missing (not recorded), outdated (the script or voice changed since) or ready.
Responses
| Status | Meaning |
|---|---|
200 | The video. |
404 | No such video. |
Example of the 200 answer:
{
"video": {
"id": "b921df158655611f",
"title": "Why the sky is blue",
"domain": "science",
"scenes": 3,
"durationSeconds": 21.4,
"look": {
"colors": [
"#06283d",
"#0e7490",
"#4338ca"
],
"emoji": "🌧️"
},
"visibility": "private",
"createdAt": "2026-10-12T21:35:31.303Z",
"updatedAt": "2026-10-12T21:35:31.303Z",
"narration": {
"status": "missing",
"durationSeconds": null
},
"spec": "{ … the document … }"
}
}Example
curl https://www.bana.video/api/videos/b921df158655611f \
-H "Authorization: Bearer $API_TOKEN"PUT /api/videos/{id}
Replace a video's document.
- Endpoint id:
videos-put - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
The id stays. The voice-over is recorded again only when the spoken text or the voice changed, and then only for the sentences that changed.
Request body (an example; "{ … }" stands for a value you fill in):
{
"spec": "{ … the new document … }"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
spec | object | yes | The video document, as JSON. It is checked by the validator, which reports every problem with its path (see GET /api/schema and POST /api/validate). |
Responses
| Status | Meaning |
|---|---|
200 | The updated video. |
422 | The document has problems. |
Example
curl -X PUT https://www.bana.video/api/videos/b921df158655611f \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"spec": {
"title": "Why the sky is blue",
"domain": "science",
"scenes": [
{
"kind": "intro",
"say": [
"Why is the sky blue?",
"The answer is hiding in sunlight."
]
},
{
"kind": "statement",
"text": "Sunlight is made of **every colour** at once.",
"say": "Sunlight is made of every colour at once."
},
{
"kind": "statement",
"text": "Blue light scatters the **most**, so blue is the colour we see.",
"say": "Blue light scatters the most, so blue is the colour we see."
}
]
}
}'PATCH /api/videos/{id}
Rename a video.
- Endpoint id:
videos-rename - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Only the title changes (up to 80 characters), so the recorded voice-over stays as it is.
Request body (an example):
{
"title": "The sky, explained"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string | yes | Limits: 1–80 characters. |
Responses
| Status | Meaning |
|---|---|
200 | The renamed video. |
400 | The title is empty or too long. |
404 | No such video. |
Example of the 200 answer:
{
"video": {
"id": "b921df158655611f",
"title": "The sky, explained",
"domain": "science",
"scenes": 3,
"durationSeconds": 21.4,
"look": {
"colors": [
"#06283d",
"#0e7490",
"#4338ca"
],
"emoji": "🌧️"
},
"visibility": "private",
"createdAt": "2026-10-12T21:35:31.303Z",
"updatedAt": "2026-10-12T21:35:31.303Z",
"narration": {
"status": "missing",
"durationSeconds": null
},
"spec": "{ … the document … }"
}
}Example
curl -X PATCH https://www.bana.video/api/videos/b921df158655611f \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "The sky, explained"
}'PUT /api/videos/{id}/visibility
Make a video public or private.
- Endpoint id:
videos-visibility - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
New videos are private. Changing the document does not change visibility. Public videos can be watched at /watch/{id} and embedded; private ones answer 404 to anonymous visitors.
Request body (an example):
{
"visibility": "public"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
visibility | enum | yes | Allowed: private, public. |
Responses
| Status | Meaning |
|---|---|
200 | The video with its new visibility. |
404 | No such video. |
Example of the 200 answer:
{
"video": {
"id": "b921df158655611f",
"title": "Why the sky is blue",
"domain": "science",
"scenes": 3,
"durationSeconds": 21.4,
"look": {
"colors": [
"#06283d",
"#0e7490",
"#4338ca"
],
"emoji": "🌧️"
},
"visibility": "public",
"createdAt": "2026-10-12T21:35:31.303Z",
"updatedAt": "2026-10-12T21:35:31.303Z",
"narration": {
"status": "missing",
"durationSeconds": null
},
"spec": "{ … the document … }"
}
}Example
curl -X PUT https://www.bana.video/api/videos/b921df158655611f/visibility \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"visibility": "public"
}'POST /api/videos/{id}/duplicate
Copy a video.
- Endpoint id:
videos-duplicate - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
The copy has a new id and the title … (copy). Change it freely: the original is not touched.
Responses
| Status | Meaning |
|---|---|
201 | The new video. Location points to it. |
404 | No such video. |
Example of the 201 answer:
{
"video": {
"id": "0f3a9c61d2b84e57",
"title": "Why the sky is blue (copy)",
"domain": "science",
"scenes": 3,
"durationSeconds": 21.4,
"look": {
"colors": [
"#06283d",
"#0e7490",
"#4338ca"
],
"emoji": "🌧️"
},
"visibility": "private",
"createdAt": "2026-10-12T21:35:31.303Z",
"updatedAt": "2026-10-12T21:35:31.303Z",
"narration": {
"status": "missing",
"durationSeconds": null
},
"spec": "{ … the document … }"
}
}Example
curl -X POST https://www.bana.video/api/videos/b921df158655611f/duplicate \
-H "Authorization: Bearer $API_TOKEN"DELETE /api/videos/{id}
Delete a video and all of its exports.
- Endpoint id:
videos-delete - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Responses
| Status | Meaning |
|---|---|
204 | Deleted. |
Example
curl -X DELETE https://www.bana.video/api/videos/b921df158655611f \
-H "Authorization: Bearer $API_TOKEN"POST /api/videos/{id}/narration
Record the voice-over.
- Endpoint id:
narration - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Optional: exports do this on their own. Useful to hear the result first, or to have it ready before a burst of exports.
Responses
| Status | Meaning |
|---|---|
202 | The job to follow with GET /api/jobs/{id}. |
503 | The voice server is not reachable. |
Example
curl -X POST https://www.bana.video/api/videos/b921df158655611f/narration \
-H "Authorization: Bearer $API_TOKEN"GET /api/videos/{id}/audio
The recorded narration as MP3.
- Endpoint id:
audio - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Redirects to the file in storage, which supports Range requests, so players can seek. Answers 404 until the voice-over is ready.
Responses
| Status | Meaning |
|---|---|
307 | Redirect to the audio (audio/mpeg). |
404 | Not recorded, or out of date. |
Example
curl -L -o narration.mp3 https://www.bana.video/api/videos/b921df158655611f/audio \
-H "Authorization: Bearer $API_TOKEN"POST /api/narration/draft
Record the voice-over of a document that is not saved yet.
- Endpoint id:
draft-narration - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
What the editor's “Generate voice-over” button calls. The body is { "spec": <video document> }. Only the spoken words and the voice are recorded, so the recording is found again by its fingerprint and re-used for any look of the same script. Saving the video later picks it up, without recording again. Answers 200 with the draft when it exists already, otherwise 202 with the job to follow.
Request body (an example):
{
"spec": {
"title": "Why the sky is blue",
"domain": "science",
"scenes": [
{
"kind": "intro",
"say": [
"Why is the sky blue?",
"The answer is hiding in sunlight."
]
},
{
"kind": "statement",
"text": "Sunlight is made of **every colour** at once.",
"say": "Sunlight is made of every colour at once."
},
{
"kind": "statement",
"text": "Blue light scatters the **most**, so blue is the colour we see.",
"say": "Blue light scatters the most, so blue is the colour we see."
}
]
}
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
spec | object | yes | The video document, as JSON. It is checked by the validator, which reports every problem with its path (see GET /api/schema and POST /api/validate). |
Responses
| Status | Meaning |
|---|---|
200 | Already recorded: { draft: { fingerprint, timings, audioUrl }, job: null }. |
202 | Recording. { draft: null, job }; follow it with GET /api/jobs/{id}, then send the same request again to get the draft. |
409 | The document is silent (narration.enabled is false), so there is nothing to record. |
422 | The video document has problems. |
Example
curl -X POST https://www.bana.video/api/narration/draft \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"spec": {
"title": "Why the sky is blue",
"domain": "science",
"scenes": [
{
"kind": "intro",
"say": [
"Why is the sky blue?",
"The answer is hiding in sunlight."
]
},
{
"kind": "statement",
"text": "Sunlight is made of **every colour** at once.",
"say": "Sunlight is made of every colour at once."
},
{
"kind": "statement",
"text": "Blue light scatters the **most**, so blue is the colour we see.",
"say": "Blue light scatters the most, so blue is the colour we see."
}
]
}
}'POST /api/narration/draft/lookup
Is the voice-over of a document recorded already?
- Endpoint id:
draft-lookup - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Only looks, never records. The editor asks this when you load an example or change the words, so a voice-over that exists is there at once. The demos ship with theirs.
Request body (an example):
{
"spec": {
"title": "Why the sky is blue",
"domain": "science",
"scenes": [
{
"kind": "intro",
"say": [
"Why is the sky blue?",
"The answer is hiding in sunlight."
]
},
{
"kind": "statement",
"text": "Sunlight is made of **every colour** at once.",
"say": "Sunlight is made of every colour at once."
},
{
"kind": "statement",
"text": "Blue light scatters the **most**, so blue is the colour we see.",
"say": "Blue light scatters the most, so blue is the colour we see."
}
]
}
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
spec | object | yes | The video document, as JSON. It is checked by the validator, which reports every problem with its path (see GET /api/schema and POST /api/validate). |
Responses
| Status | Meaning |
|---|---|
200 | { draft: { fingerprint, timings, audioUrl } }, or { draft: null } when there is none. |
422 | The video document has problems. |
Example
curl -X POST https://www.bana.video/api/narration/draft/lookup \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"spec": {
"title": "Why the sky is blue",
"domain": "science",
"scenes": [
{
"kind": "intro",
"say": [
"Why is the sky blue?",
"The answer is hiding in sunlight."
]
},
{
"kind": "statement",
"text": "Sunlight is made of **every colour** at once.",
"say": "Sunlight is made of every colour at once."
},
{
"kind": "statement",
"text": "Blue light scatters the **most**, so blue is the colour we see.",
"say": "Blue light scatters the most, so blue is the colour we see."
}
]
}
}'GET /api/narration/draft/{fingerprint}/audio
A recorded draft voice-over as MP3.
- Endpoint id:
draft-audio - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Redirects to the recording, which supports Range requests. The audioUrl of a draft points here.
Responses
| Status | Meaning |
|---|---|
307 | Redirect to the audio (audio/mpeg). |
404 | No such recording. |
Example
curl -L -o draft.mp3 https://www.bana.video/api/narration/draft/3cc982906520/audio \
-H "Authorization: Bearer $API_TOKEN"Endpoints: Files
Recordings and music uploaded from the editor, or from your own code, to use in a document: narration.voiceover.src for your own voice, music.src for the music, brand.logo for a logo.
POST /api/assets
Upload a small audio file, image or clip.
- Endpoint id:
asset-upload - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
For files up to 4 MB (the most a request to this server can carry); for larger files use the two steps below. The body is the raw file, not JSON. kind (audio, image or video) goes in the query, and the original name in the X-File-Name header, percent-encoded. Audio of any common format is converted to MP3; images are checked by their content. A video (MP4, MOV or WebM, from half a second to a minute) is prepared as a silent MP4 with a poster still, which GET /api/assets/{id}/poster returns: use its url as the src of a clip scene. Footage is nearly always larger than 4 MB, so send it in the two steps below.
Query parameters and headers
| Field | Type | Required | Description |
|---|---|---|---|
kind | enum | yes | Query parameter: what the file is. Allowed: audio, image, video. |
X-File-Name | string | no | Header: the original file name, percent-encoded (encodeURIComponent). A name that cannot be decoded is ignored. |
(body) | bytes | yes | The raw file, not JSON (--data-binary @file). |
Responses
| Status | Meaning |
|---|---|
201 | The file. Use its url in a document. |
400 | kind is missing, the file is empty, or not what kind says. |
413 | The file is too large for this way of uploading (or over the limit of its kind: 60 MB of audio, 8 MB of an image). |
Example of the 201 answer:
{
"asset": {
"id": "9f2c1d7a40b3e865",
"kind": "audio",
"name": "voice.m4a",
"url": "/api/assets/9f2c1d7a40b3e865",
"bytes": 482113,
"durationSeconds": 21.4
}
}Example
curl -X POST "https://www.bana.video/api/assets?kind=audio" \
-H "Authorization: Bearer $API_TOKEN" \
-H "X-File-Name: voice.m4a" \
--data-binary @voice.m4aPOST /api/assets/uploads
Upload a file of any size, step 1: get an address to send it to.
- Endpoint id:
asset-upload-start - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Tell what the file is and how many bytes it has. You get an upload.url to PUT the raw file to (with the headers given, and no Authorization header), straight to file storage. The address works for ten minutes. Then finish with step 2. Up to 60 MB of audio, 8 MB of an image or 100 MB of a video clip.
Request body (an example):
{
"kind": "audio",
"bytes": 482113
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
kind | enum | yes | What the file is. Allowed: audio, image, video. |
bytes | integer | yes | The size of the file in bytes: a positive whole number. |
Responses
| Status | Meaning |
|---|---|
201 | Where to send the file. |
400 | bytes is not a positive whole number. |
413 | The file is larger than the limit of its kind. |
Example of the 201 answer:
{
"upload": {
"uploadId": "5d0e7a93c1b2f468",
"url": "https://…",
"headers": {
"Content-Type": "application/octet-stream"
}
}
}Example
curl -X POST https://www.bana.video/api/assets/uploads \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"kind": "audio",
"bytes": 482113
}'POST /api/assets/uploads/{uploadId}
Upload a file of any size, step 2: finish.
- Endpoint id:
asset-upload-finish - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Once the PUT of step 1 is done, this checks the file, converts audio to MP3 and keeps it as an asset. name is the original file name. Use the url of the asset in a document.
Request body (an example):
{
"kind": "audio",
"name": "voice.m4a"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
kind | enum | yes | What the file is: the same as in step 1. Allowed: audio, image, video. |
name | string | no | The original file name. |
Responses
| Status | Meaning |
|---|---|
201 | The file, as in the answer of the upload above. |
400 | The file did not arrive, or is not what kind says. |
Example
curl -X POST https://www.bana.video/api/assets/uploads/5d0e7a93c1b2f468 \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"kind": "audio",
"name": "voice.m4a"
}'GET /api/assets/{id}
An uploaded file.
- Endpoint id:
asset-get - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Redirects to the file in storage, which supports Range requests, so players can seek. Only your own files can be read.
Responses
| Status | Meaning |
|---|---|
307 | Redirect to the file. |
404 | No such file. |
Example
curl -L -o voice.mp3 https://www.bana.video/api/assets/9f2c1d7a40b3e865 \
-H "Authorization: Bearer $API_TOKEN"GET /api/assets/{id}/poster
The poster still of a clip.
- Endpoint id:
asset-poster - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
A JPEG taken from the clip, to show where the clip itself is not wanted (lists, thumbnails). Redirects to the file in storage. Only video clips have one.
Responses
| Status | Meaning |
|---|---|
307 | Redirect to the picture. |
404 | No such file, or it is not a clip. |
Example
curl -L -o poster.jpg https://www.bana.video/api/assets/4b7e0c19d2a35f68/poster \
-H "Authorization: Bearer $API_TOKEN"DELETE /api/assets/{id}
Delete an uploaded file.
- Endpoint id:
asset-delete - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Removes the file, and the poster of a clip. A video that still uses it shows nothing in its place until you choose another.
Responses
| Status | Meaning |
|---|---|
200 | { ok: true }. |
404 | No such file. |
Example
curl -X DELETE https://www.bana.video/api/assets/9f2c1d7a40b3e865 \
-H "Authorization: Bearer $API_TOKEN"Endpoints: Exports
An export turns a stored video into a file. Several can run for the same video, in different formats and sizes.
POST /api/videos/{id}/exports
Start an export.
- Endpoint id:
exports-start - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
The body is the export options; every field is optional. An empty body exports a 1080p MP4 in the shape the video was made for (aspect of the document), or 16:9 when it names none.
Request body (an example):
{
"format": "mp4",
"aspect": "9:16",
"resolution": "1080p",
"fps": 30
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
format | enum | no | What to produce. Allowed: mp4, webm, mov, gif, mp3, png, srt, vtt, json. |
aspect | enum | no | Shape of the picture: 16:9 landscape, 9:16 vertical, 1:1 square... Default: the shape the video was made for (aspect in its document), else 16:9. Allowed: 16:9, 4:3, 1:1, 4:5, 3:4, 9:16. |
resolution | enum | no | Pixels of the shorter side: 1080p is 1920×1080 for 16:9 and 1080×1920 for 9:16. Allowed: 360p, 480p, 720p, 1080p, 1440p, 2160p. |
fps | integer | no | Frames per second. Limits: 10–60. |
quality | enum | no | Encoder quality. draft is fastest. Allowed: draft, standard, high. |
captions | boolean | no | Draw the captions into the picture. Default true. |
at | number | no | For png: the moment (seconds) to capture. Default: the title card. |
settle | integer | no | For png: milliseconds of animation played before the capture. Default 2000, when everything has finished arriving; 0 freezes the first instant of every animation. Limits: 0–10000. |
music | object | no | Mix background music under the narration (mp4, webm, mov and mp3). |
music.src | string | yes | Address of the music: an http(s) link to an MP3, WAV, M4A or OGG file. It loops to fill the video and fades out at the end. Limits: up to 2000 characters. |
music.volume | number | no | Loudness of the music, 0 to 1, where the narration is 1. Default 0.18. Limits: 0–1. |
music.duck | boolean | no | Lower the music further while the narrator speaks. Default true. |
callbackUrl | string | no | When the job finishes (done, failed or cancelled), the job is POSTed to this address as JSON: { "event": "job.finished", "job": { … } }. It must be reachable on the public internet: addresses of private networks (localhost, 10.x.x.x, 192.168.x.x) are refused. Limits: up to 2000 characters. |
previewSeconds | number | no | Render only the first N seconds, to check settings quickly. Limits: 1–3600. |
drawIn | enum | no | Where the pictures are drawn. browser: by the browser the export was asked from, while it stays on the page (the dashboard does this by default in a browser that can: it saves a round trip and uses the computer of the person who waits). Only for mp4 and mov videos with no footage clips: for anything else it is ignored. When no browser takes the export up in a few seconds, or the page is left, a render machine or the server draws it as usual. Leave it out in scripts: there is no browser to take it, and the export would only wait a few seconds for one. Default: server. Allowed: server, browser. |
Responses
| Status | Meaning |
|---|---|
202 | The job. Location points to it. |
400 | An option is invalid (unknown field, out of range). |
Example of the 202 answer:
{
"job": {
"id": "75ae15a72b77b7b1",
"kind": "export",
"videoId": "b921df158655611f",
"status": "running",
"phase": "Drawing frames",
"progress": 0.42,
"options": {
"format": "mp4",
"aspect": "9:16",
"resolution": "1080p",
"fps": 30,
"quality": "standard",
"captions": true
},
"error": null,
"file": null,
"createdAt": "2026-10-12T21:38:44.157Z",
"startedAt": "2026-10-12T21:38:44.159Z",
"finishedAt": null
}
}Example
curl -X POST https://www.bana.video/api/videos/b921df158655611f/exports \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"format": "mp4",
"aspect": "9:16",
"resolution": "1080p",
"fps": 30
}'GET /api/videos/{id}/exports
List a video's exports, newest first.
- Endpoint id:
exports-list - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Responses
| Status | Meaning |
|---|---|
200 | The jobs. |
Example of the 200 answer:
{
"jobs": [
{
"id": "75ae15a72b77b7b1",
"kind": "export",
"videoId": "b921df158655611f",
"status": "running",
"phase": "Drawing frames",
"progress": 0.42,
"options": {
"format": "mp4",
"aspect": "9:16",
"resolution": "1080p",
"fps": 30,
"quality": "standard",
"captions": true
},
"error": null,
"file": null,
"createdAt": "2026-10-12T21:38:44.157Z",
"startedAt": "2026-10-12T21:38:44.159Z",
"finishedAt": null
}
]
}Example
curl https://www.bana.video/api/videos/b921df158655611f/exports \
-H "Authorization: Bearer $API_TOKEN"DELETE /api/jobs/{id}
Cancel a running job, or delete a finished one.
- Endpoint id:
job-delete - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
A queued or running job is stopped and returned as cancelled. A finished job is removed together with its file.
Responses
| Status | Meaning |
|---|---|
200 | The cancelled job. |
204 | A finished job was removed. |
Example
curl -X DELETE https://www.bana.video/api/jobs/75ae15a72b77b7b1 \
-H "Authorization: Bearer $API_TOKEN"Endpoints: Public watch and embed
These need no API token. They only work for videos whose visibility is public; private and unknown ids both answer 404.
GET /api/oembed
oEmbed 1.0 for a watch-page URL.
- Endpoint id:
oembed - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
Query: url (a /watch/{id} address on this site), optional maxwidth, maxheight, format=json.
Query parameters and headers
| Field | Type | Required | Description |
|---|---|---|---|
url | string | yes | The address of a watch page of this site: <origin>/watch/<id> (16 hexadecimal characters). Without it: 400. |
maxwidth | integer | no | The most pixels across the iframe may take. Anything that is not a positive whole number is ignored. |
maxheight | integer | no | The most pixels down the iframe may take. Anything that is not a positive whole number is ignored. |
format | enum | no | Only json is served; any other value answers 404. Allowed: json. |
Responses
| Status | Meaning |
|---|---|
200 | A video oEmbed object with an iframe html field. |
404 | Not a public video on this site. |
Example
curl "https://www.bana.video/api/oembed?url=https%3A%2F%2Fwww.bana.video%2Fwatch%2Fb921df158655611f&format=json"GET /api/public/videos/{id}
A public video as a payload, for the web component.
- Endpoint id:
public-video - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
What <video-player src="…"> reads: the document, the timings and the address of the voice-over. Any origin may read it (CORS). See the web component guide.
Responses
| Status | Meaning |
|---|---|
200 | { spec, timings, audioUrl }. |
404 | Private or unknown. |
Example
curl "https://www.bana.video/api/public/videos/b921df158655611f"GET /api/public/videos/{id}/audio
Narration MP3 for a public video.
- Endpoint id:
public-audio - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
Responses
| Status | Meaning |
|---|---|
307 | Redirect to the audio when it is current. |
404 | Private, unknown, or narration not ready. |
Example
curl -I "https://www.bana.video/api/public/videos/b921df158655611f/audio"GET /api/public/videos/{id}/assets/{assetId}
A file used by a public video: a picture, a clip, a recording or the music.
- Endpoint id:
public-asset - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
Open to everyone exactly as long as the video is public and its document uses the file: nothing is kept per file, so a file used by several videos stays open while any one of them is public, and a video that turns private stops handing out its files at once (an address already handed out works until it expires). Every request is answered with a fresh redirect to a signed address in storage (which supports Range); the address of a picture works for an hour (a browser may reuse the redirect for 50 minutes of it), and that of a clip, recording or piece of music for six hours.
Responses
| Status | Meaning |
|---|---|
307 | Redirect to the file in storage. |
404 | The video is not public, or the file is not used in its document. |
Example
curl -I "https://www.bana.video/api/public/videos/b921df158655611f/assets/0123456789abcdef"Endpoints: Reference data
Everything the engine accepts, as data, for building your own tools around it.
GET /api/schema
JSON Schema of the video document.
- Endpoint id:
schema - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
Responses
| Status | Meaning |
|---|---|
200 | JSON Schema, draft 2020-12. |
Example
curl https://www.bana.video/api/schema \
-H "Authorization: Bearer $API_TOKEN"GET /api/catalog
Scenes, palettes, fonts, backgrounds, domains and more.
- Endpoint id:
catalog - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
Each scene comes with a description, how its narration works and a complete example.
Responses
| Status | Meaning |
|---|---|
200 | The catalog. |
Example
curl https://www.bana.video/api/catalog \
-H "Authorization: Bearer $API_TOKEN"GET /api/examples
Ready-made documents.
- Endpoint id:
examples - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
Responses
| Status | Meaning |
|---|---|
200 | { examples: [{ id, spec }] }. |
Example
curl https://www.bana.video/api/examples \
-H "Authorization: Bearer $API_TOKEN"GET /api/examples/{id}
One ready-made video as a payload, with its voice-over.
- Endpoint id:
example - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
The same shape as a public video, for <video-player src="…">. Any origin may read it (CORS).
Responses
| Status | Meaning |
|---|---|
200 | { spec, timings, audioUrl }. |
404 | No example has this id. |
Example
curl https://www.bana.video/api/examples/ads-videobana \
-H "Authorization: Bearer $API_TOKEN"GET /api/health
What works on this server.
- Endpoint id:
health - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Checks ffmpeg, Chrome, the voice server, the AI key, the database and the file storage. Each check says whether the part works; the detail of it (what the part is and what went wrong) is only for the administrator of the server.
Responses
| Status | Meaning |
|---|---|
200 | status is ok or degraded; checks says which parts work, each as Available or Unavailable. |
Example of the 200 answer:
{
"status": "degraded",
"checks": {
"ffmpeg": {
"ok": true,
"detail": "Available"
},
"voice": {
"ok": false,
"detail": "Unavailable"
}
}
}Example
curl https://www.bana.video/api/health \
-H "Authorization: Bearer $API_TOKEN"Endpoints the API guide does not list
Read from the route handlers, not from the API guide. These exist on the server and are not on /docs/api. The endpoints under “Walkthroughs” accept an API token like the rest of the API; the others are public, for the dashboard, internal, or for administrators, as marked.
Not in the guide: Walkthroughs
A walkthrough is a narrated tour of your own web app, recorded with the Videobana recorder and played on the app's real interface by bana.js (<script src="https://www.bana.video/bana.js" data-key="<site key>">). These endpoints keep, edit, publish, voice and measure the walkthroughs of the account. They answer { walkthrough } with the fields below; the list answers summaries. The videobana-walkthroughs skill explains walkthroughs, their steps and bana.js in depth.
Walkthrough summary (the list)
| Field | What it is |
|---|---|
id | 16 hexadecimal characters. |
title | Its title. |
status | draft or live. New walkthroughs are draft; only live ones play for visitors. |
origin | The site it plays on: the scheme, host and port of the page it was recorded on. |
startPath | The path of the page it starts on. |
stepCount | The steps on the page, without the intro and the ending. |
voiceKind | How it is heard: none, browser, standard, premium. |
voiceStatus | ready (the recording says the steps as they are), outdated (the words or the voice changed since), missing (never recorded) or none (text only or the browser's voice: nothing to record). |
thumbnailUrl | The screenshot of the first step that has one, or null. |
demoShared | Whether it is shared as an interactive demo (/try/{id}). |
videoId | The video made from it, or null. |
createdAt | ISO 8601 time. |
updatedAt | ISO 8601 time. |
stats | Its use over the period asked for (?days=, 30 by default): starts, completions, completionRate (0 to 1, null before anyone started it), dismissals (closed early), daily (the starts of each of the last 14 days), dropOff ({ step, title, left }: the step at which most visitors closed it, once at least 3 did; else null) and lastStart (the last day it was started in the period, YYYY-MM-DD, or null). |
Walkthrough details ({ walkthrough })
Everything in the summary, and:
| Field | What it is |
|---|---|
definition | The steps and settings, as POST /api/walkthroughs takes them (with the defaults filled in). |
previewToken | Lets it play on its site before it is live: open the page with #bana-tour=<id>&preview=<token>, or pass ?preview= to the public endpoints. |
voiceSeconds | The length of the recorded voice when it is ready, else null. |
shots | The address of each step screenshot, by asset id. |
siteSeenAt | When the account's bana.js was last seen on the walkthrough's site (ISO time), or null when it never was (not installed yet). |
Walkthrough stats (stats, and overview of the list)
| Field | What it is |
|---|---|
days | The days counted, up to and including today (UTC). |
starts | How often it was started. |
completions | How often it was finished. |
dismissals | How often it was closed early. |
completionRate | Completions out of starts, 0 to 1; null before anyone started it. |
daily | { day, starts, completions } for every day, oldest first (day is YYYY-MM-DD). |
funnel | { step, reached, leftHere } for every step: how many reached it, and how many closed the tour there. |
pages | { page, starts }: the pages it was started on (no query or fragment), most first. |
demo | Only for one walkthrough: how its interactive demo was used over the same days: { views, starts, completions, ctaClicks, completionRate (completions out of starts), daily: [{ day, views, starts, completions }], funnel: [{ step, reached }] }. Its owner's own views are never counted. |
overview adds:
| Field | What it is |
|---|---|
live | How many walkthroughs are live. |
total | How many walkthroughs there are. |
sites | Every site of the account (those its walkthroughs are made for, and those the script was seen on): { origin, lastSeen, live, total }. |
previous | The same period just before, to compare: { starts, completions, completionRate }. |
GET /api/walkthroughs
List your walkthroughs, with their use and the site key.
- Endpoint id:
walkthroughs-list - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Every walkthrough of the account as a summary with its use over the last days days (?days=7, 30 or 90; default 30), the use of all of them added up (overview, a walkthrough stats object plus live, total, sites and previous, the same totals for the period just before), and the account's site key (bk_…), which the bana.js script tag carries as data-key.
Responses
| Status | Meaning |
|---|---|
200 | { walkthroughs: [summary, …], overview, siteKey }. |
Example
curl "https://www.bana.video/api/walkthroughs" \
-H "Authorization: Bearer $API_TOKEN"POST /api/walkthroughs
Keep a walkthrough.
- Endpoint id:
walkthroughs-create - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
What the recorder sends. url is the page it was recorded on: its origin becomes the walkthrough's site and its path the page it starts on. Upload each step's screenshot first as a picture (POST /api/assets?kind=image) and give its id as shot.assetId. Steps: up to 40 on the page, plus an optional intro and ending (kind: intro first, outro last), which point at no element and do nothing on the page; at least one step must be on the page. Step ids are 4 to 16 letters or digits. A new walkthrough is a draft.
Request body (an example):
{
"title": "Invite a teammate",
"url": "https://app.example.com/settings/team",
"definition": {
"description": "How to add someone to your team.",
"steps": [
{
"id": "s1invite",
"target": "#invite-button",
"label": "Invite",
"tag": "button",
"path": "/settings/team",
"title": "Open the invite form",
"text": "Everyone you invite joins this workspace.",
"action": "click",
"placement": "bottom",
"shot": {
"assetId": "3c9d0e5a71b2f486",
"focus": {
"x": 72,
"y": 8,
"width": 12,
"height": 6
}
}
},
{
"id": "s2email",
"target": "input[name=email]",
"label": "Email",
"tag": "input",
"path": "/settings/team",
"title": "Type their email",
"action": "type",
"type": "sam@example.com",
"perform": false
}
],
"settings": {
"mode": "show",
"advance": "auto",
"textAdvance": "manual",
"voice": {
"kind": "standard",
"voice": "F2"
},
"textOnly": true,
"startWith": "voice",
"autostart": false,
"listed": true
}
}
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string | yes | The walkthrough's name. Limits: 1–80 characters. |
url | string | yes | The page it was recorded on: its origin is the site it is made for, its path where it starts. Limits: up to 2000 characters. |
definition | object | yes | The steps and settings (see the definition above). |
definition.description | string | no | What the walkthrough shows, in the help panel (searchable) and the suggested intro. Limits: 1–220 characters. |
definition.steps | object[] | yes | The steps in order: at most 40 on the page, plus an optional intro (first) and outro (last). Limits: 1–42 items. |
definition.steps[].id | string | yes | The step's own id: 4 to 16 letters or digits, unique in the walkthrough. |
definition.steps[].kind | enum | no | intro (only the first step) or outro (only the last): a card about the walkthrough itself, in the middle of the page, with no element and no action. Leave out for a step on the page. Allowed: intro, outro. |
definition.steps[].target | string | no | The element, as a CSS selector. Leave out for a step about the whole page (its card sits in the middle). Limits: 1–600 characters. |
definition.steps[].label | string | no | The element's accessible name when it was recorded: it is found by it (with tag) when the selector no longer matches. Limits: 1–120 characters. |
definition.steps[].tag | string | no | The element's tag when it was recorded, lowercase (button, a, input). |
definition.steps[].path | string | no | The page the step is on (its path, /settings/team), for a walkthrough that goes from page to page. Limits: up to 300 characters. |
definition.steps[].title | string | no | The title on the step's card. Optional: a step needs a title, a detail (text) or a narration (say), any one of them. Limits: 1–48 characters. |
definition.steps[].text | string | no | A line of detail under the title. Limits: 1–150 characters. |
definition.steps[].say | string | no | What the voice says, shown as text on the card. Without it the title (and detail) is said. Limits: 1–500 characters. |
definition.steps[].action | enum | no | What happens on the element: none (pointed at), click, type (types type, then presses keys if any) or keys. Default none. Allowed: none, click, type, keys. |
definition.steps[].type | string | no | The text a type step types. Limits: 1–60 characters. |
definition.steps[].keys | string[] | no | The keys a keys step presses together, in order (["Ctrl", "K"]); on a type step, pressed after typing (["Enter"]). Limits: 1–4 items, each 1–10 characters. |
definition.steps[].perform | boolean | no | Do the action for real during a show tour, so the page follows (a menu opens, a dialog appears). Keep it false for what saves, creates, deletes, pays or sends. Default true. |
definition.steps[].placement | enum | no | Where the card goes beside the element. Default auto: the side with the most room. Allowed: auto, top, bottom, left, right. |
definition.steps[].shot | object | no | The step's screenshot and where its element is on it, for the dashboard and the guide video. |
definition.steps[].shot.assetId | string | yes | The screenshot: a picture of the account (16 hexadecimal digits). |
definition.steps[].shot.focus | object | yes | Where the element is on the screenshot (the whole page for an intro or outro). |
definition.steps[].shot.focus.x | number | yes | Left edge, in percent of the screenshot's width. Limits: 0–100. |
definition.steps[].shot.focus.y | number | yes | Top edge, in percent of its height. Limits: 0–100. |
definition.steps[].shot.focus.width | number | yes | Width, in percent. Limits: 0–100. |
definition.steps[].shot.focus.height | number | yes | Height, in percent. Limits: 0–100. |
definition.steps[].shot.click | object | no | Where the pointer presses, for a step that clicks or types. |
definition.steps[].shot.click.x | number | yes | Left edge, in percent of the screenshot's width. Limits: 0–100. |
definition.steps[].shot.click.y | number | yes | Top edge, in percent of its height. Limits: 0–100. |
definition.steps[].shot.click.width | number | yes | Width, in percent. Limits: 0–100. |
definition.steps[].shot.click.height | number | yes | Height, in percent. Limits: 0–100. |
definition.steps[].shot.redact | object[] | no | Private details on the screenshot, hidden in every video made from it. Limits: up to 20 items. |
definition.steps[].shot.redact[].x | number | yes | Left edge, in percent of the screenshot's width. Limits: 0–100. |
definition.steps[].shot.redact[].y | number | yes | Top edge, in percent of its height. Limits: 0–100. |
definition.steps[].shot.redact[].width | number | yes | Width, in percent. Limits: 0–100. |
definition.steps[].shot.redact[].height | number | yes | Height, in percent. Limits: 0–100. |
definition.steps[].shot.redact[].style | enum | no | blur (default) or cover, for secrets. Allowed: blur, cover. |
definition.steps[].shot.page | string | no | The name of the page the screenshot shows, in the window's tab of the video. Limits: 1–48 characters. |
definition.settings | object | no | How it plays and is heard. |
definition.settings.mode | enum | no | show (default) plays by itself like a video; try waits for the visitor to do each action on the real page. Allowed: show, try. |
definition.settings.advance | enum | no | For the voice walkthrough: auto (default) goes on when a step has been said; manual waits for Next. Visitors can switch. The text-only walkthrough has its own (textAdvance). Allowed: auto, manual. |
definition.settings.textAdvance | enum | no | For the text-only walkthrough: manual (default) waits for Next; auto goes on by itself once a step has been on screen long enough to read (textSeconds, or the time its words take to read). Visitors can switch. Allowed: auto, manual. |
definition.settings.textSeconds | integer | no | Seconds each step of the text-only walkthrough stays when it goes on by itself (2 to 60). Left out: the time its words take to read. Limits: 2–60. |
definition.settings.voice | object | no | How the walkthrough is heard: the voice walkthrough. kind none (default) has no voice, so it plays as text only. |
definition.settings.voice.kind | enum | no | none (text only, default), browser (the visitor's browser voice), or the account's standard or premium voice, recorded once from its allowance. Allowed: none, browser, standard, premium. |
definition.settings.voice.voice | enum | no | The standard voice. Allowed: M1, M2, M3, M4, M5, F1, F2, F3, F4, F5. |
definition.settings.voice.speed | number | no | How fast the standard voice speaks (1 is normal). Limits: 0.5–2. |
definition.settings.voice.premium | object | no | The premium voice and how it is directed. |
definition.settings.voice.premium.voice | enum | no | One of 30 studio voices (see GET /api/catalog). Default Kore. Allowed: Zephyr, Puck, Charon, Kore, Fenrir, Leda, Orus, Aoede, Callirrhoe, Autonoe, Enceladus, Iapetus, Umbriel, Algieba, Despina, Erinome, Algenib, Rasalgethi, Laomedeia, Achernar, Alnilam, Schedar, Gacrux, Pulcherrima, Achird, Zubenelgenubi, Vindemiatrix, Sadachbia, Sadaltager, Sulafat. |
definition.settings.voice.premium.style | string | no | How the whole video is delivered: emotion, energy, inflection. Short and concrete, e.g. "warm, confident, with a smile in the voice". Scenes can add to it with their own delivery. Limits: 1–160 characters. |
definition.settings.voice.premium.accent | string | no | A regional accent or dialect as a soft hint, e.g. "British" or "Scottish". The voice keeps its own character; the model follows the hint most of the time. Limits: 1–40 characters. |
definition.settings.voice.premium.pace | enum | no | How quickly the voice speaks. Default natural. Allowed: slow, natural, brisk. |
definition.settings.voice.lang | enum | no | The language of the voice. Allowed: en, ko, ja, ar, bg, cs, da, de, el, es, et, fi, fr, hi, hr, hu, id, it, lt, lv, nl, pl, pt, ro, ru, sk, sl, sv, tr, uk, vi, zh, th, he, ms, no, ur, ps, na. |
definition.settings.textOnly | boolean | no | Also offer the text-only walkthrough (no sound, all the text at once, Next to go on) besides the voice one, with a button on the card to switch. Default true; false keeps a walkthrough with a voice to its voice. Without a voice it is the only way, whatever this says. |
definition.settings.startWith | enum | no | Which way starts first when both are offered: voice (default) or text. A visitor's own choice, once they switch, is remembered and wins. Allowed: voice, text. |
definition.settings.autostart | boolean | no | Start by itself when the page it starts on opens, for visitors who have not finished, closed or skipped it (one who left it half way picks it up where they were). |
definition.settings.listed | boolean | no | Listed in the Guides button of the site. |
definition.settings.demo | object | no | Sharing it as an interactive demo: its screenshots played as a click-through tour at /try/{id} (and /embed/try/{id}), with private areas burned in. Left out, it is not shared. |
definition.settings.demo.shared | boolean | no | Anyone with the link can play it as an interactive demo (its screenshots, with private areas burned in). Default false. |
definition.settings.demo.cta | object | no | A button on the demo's ending card. |
definition.settings.demo.cta.label | string | yes | The words on the button (Start free trial). Limits: 1–28 characters. |
definition.settings.demo.cta.url | string | yes | Where it goes; it opens in a new tab. Limits: up to 2000 characters. |
videoId | string | no | A video of the account made from it, if any. |
Responses
| Status | Meaning |
|---|---|
201 | { walkthrough } with its details. Location points to it. |
400 | A field is not valid (error.details.issues says which). |
Example
curl -X POST "https://www.bana.video/api/walkthroughs" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Invite a teammate",
"url": "https://app.example.com/settings/team",
"definition": {
"description": "How to add someone to your team.",
"steps": [
{
"id": "s1invite",
"target": "#invite-button",
"label": "Invite",
"tag": "button",
"path": "/settings/team",
"title": "Open the invite form",
"text": "Everyone you invite joins this workspace.",
"action": "click",
"placement": "bottom",
"shot": {
"assetId": "3c9d0e5a71b2f486",
"focus": {
"x": 72,
"y": 8,
"width": 12,
"height": 6
}
}
},
{
"id": "s2email",
"target": "input[name=email]",
"label": "Email",
"tag": "input",
"path": "/settings/team",
"title": "Type their email",
"action": "type",
"type": "sam@example.com",
"perform": false
}
],
"settings": {
"mode": "show",
"advance": "auto",
"textAdvance": "manual",
"voice": {
"kind": "standard",
"voice": "F2"
},
"textOnly": true,
"startWith": "voice",
"autostart": false,
"listed": true
}
}
}'GET /api/walkthroughs/{id}
Read a walkthrough with its steps.
- Endpoint id:
walkthrough-get - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Responses
| Status | Meaning |
|---|---|
200 | { walkthrough } with its details. |
404 | No such walkthrough. |
Example
curl "https://www.bana.video/api/walkthroughs/4f0c2a9d81b3e657" \
-H "Authorization: Bearer $API_TOKEN"PUT /api/walkthroughs/{id}
Change a walkthrough, or make it live.
- Endpoint id:
walkthroughs-update - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Every field is optional; what is left out stays. status: "live" publishes it to its site, draft takes it back. definition replaces the steps and settings as a whole. startPath is the path of the page it starts on (starting with /). videoId links the video made from it (null unlinks it).
Request body (an example):
{
"status": "live"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
title | string | no | A new name. Limits: 1–80 characters. |
status | enum | no | live puts it on every site with the script; draft takes it off at once. Allowed: draft, live. |
definition | object | no | All the steps and settings (replaced as a whole). Its fields are the same as in the request body of POST /api/walkthroughs (listed there). |
startPath | string | no | The page of the site it starts on (/latest/). Limits: 1–300 characters. |
videoId | string | null | no | The guide video made from it, or null to forget it. |
demo | object | no | Shares it as an interactive demo, or stops ({ shared, cta }), without sending the whole definition. |
demo.shared | boolean | no | Anyone with the link can play it as an interactive demo (its screenshots, with private areas burned in). Default false. |
demo.cta | object | no | A button on the demo's ending card. |
demo.cta.label | string | yes | The words on the button (Start free trial). Limits: 1–28 characters. |
demo.cta.url | string | yes | Where it goes; it opens in a new tab. Limits: up to 2000 characters. |
Responses
| Status | Meaning |
|---|---|
200 | { walkthrough } with its details. |
400 | A field is not valid. |
404 | No such walkthrough. |
Example
curl -X PUT "https://www.bana.video/api/walkthroughs/4f0c2a9d81b3e657" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "live"
}'DELETE /api/walkthroughs/{id}
Delete a walkthrough and its recorded voice.
- Endpoint id:
walkthrough-delete - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Responses
| Status | Meaning |
|---|---|
204 | Deleted. |
404 | No such walkthrough. |
Example
curl -X DELETE "https://www.bana.video/api/walkthroughs/4f0c2a9d81b3e657" \
-H "Authorization: Bearer $API_TOKEN"POST /api/walkthroughs/{id}/duplicate
Copy a walkthrough.
- Endpoint id:
walkthrough-duplicate - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
A new draft with the same steps, settings and screenshots, titled Copy of …, without the recorded voice (record it again; sentences said before cost nothing) and without the guide video.
Responses
| Status | Meaning |
|---|---|
201 | { walkthrough }: the copy, with its details. Location points to it. |
404 | No such walkthrough. |
Example
curl -X POST "https://www.bana.video/api/walkthroughs/4f0c2a9d81b3e657/duplicate" \
-H "Authorization: Bearer $API_TOKEN"GET /api/walkthroughs/{id}/stats
How a walkthrough was used.
- Endpoint id:
walkthrough-stats - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Counted from what the live tours report: starts, completions, closings, per day, per step and per page. Nothing about a visitor is kept.
Query parameters and headers
| Field | Type | Required | Description |
|---|---|---|---|
days | integer | no | How many days back, up to today. Default 30; a value that is not a whole number from 7 to 90 counts as 30. Limits: 7–90. |
Responses
| Status | Meaning |
|---|---|
200 | { stats }. |
404 | No such walkthrough. |
Example of the 200 answer:
{
"stats": {
"days": 30,
"starts": 120,
"completions": 84,
"dismissals": 21,
"completionRate": 0.7,
"daily": [
{
"day": "2026-11-15",
"starts": 6,
"completions": 4
}
],
"funnel": [
{
"step": 0,
"reached": 120,
"leftHere": 9
},
{
"step": 1,
"reached": 104,
"leftHere": 12
}
],
"pages": [
{
"page": "https://app.example.com/settings/team",
"starts": 120
}
]
}
}Example
curl "https://www.bana.video/api/walkthroughs/4f0c2a9d81b3e657/stats?days=30" \
-H "Authorization: Bearer $API_TOKEN"POST /api/walkthroughs/{id}/voice
Record the voice of a walkthrough.
- Endpoint id:
walkthrough-voice - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Records the steps with the walkthrough's standard or premium voice (definition.settings.voice), from the allowance (a voice-over, or premium seconds), one part per step. While job is set, follow it with GET /api/jobs/{id}, then call this again to pick the recording up. A voice that already says the steps as they are is not recorded again and costs nothing.
Responses
| Status | Meaning |
|---|---|
200 | { walkthrough, job }: job is null once the recording is kept (voiceStatus is then ready). |
409 | The voice is none or browser: there is nothing to record. |
422 | The words of the walkthrough cannot be recorded. |
429 | Too many voice-over recordings in progress. |
Example
curl -X POST "https://www.bana.video/api/walkthroughs/4f0c2a9d81b3e657/voice" \
-H "Authorization: Bearer $API_TOKEN"POST /api/walkthroughs/key
Replace the account's site key.
- Endpoint id:
walkthrough-key - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Sites with the old key stop loading walkthroughs until their script tag has the new one.
Responses
| Status | Meaning |
|---|---|
200 | { siteKey }, the new key (bk_…). |
Example
curl -X POST "https://www.bana.video/api/walkthroughs/key" \
-H "Authorization: Bearer $API_TOKEN"GET /api/walkthroughs/appearance
How the account's walkthroughs look.
- Endpoint id:
walkthrough-appearance - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
The look bana.js uses on the account's sites: colours, light or dark cards, corners, text size, typeface, the Guides button and the words in its panel. saved is false until the account chose a look, and appearance is then the standard one.
Responses
| Status | Meaning |
|---|---|
200 | { appearance, saved }. |
Example
curl "https://www.bana.video/api/walkthroughs/appearance" \
-H "Authorization: Bearer $API_TOKEN"PUT /api/walkthroughs/appearance
Choose how the account's walkthroughs look.
- Endpoint id:
walkthrough-appearance-save - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Keeps the whole look (fields left out take their standard value). Sites with the script have it within a couple of minutes: the public list is cached for 60 seconds by the browser and 30 more by a shared cache (see GET /api/public/walkthroughs). What a site's script tag says itself still wins.
Responses
| Status | Meaning |
|---|---|
200 | { appearance, saved: true }. |
400 | A field is not valid (its name is in the message). |
Example
curl -X PUT "https://www.bana.video/api/walkthroughs/appearance" \
-H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" -d '{"accent":"#0ea5e9","accent2":null,"theme":"auto","radius":"round","launcher":{"label":"Need help?","style":"round"}}'DELETE /api/walkthroughs/appearance
Go back to the standard look.
- Endpoint id:
walkthrough-appearance-reset - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Responses
| Status | Meaning |
|---|---|
200 | { appearance, saved: false }, the standard look. |
Example
curl -X DELETE "https://www.bana.video/api/walkthroughs/appearance" \
-H "Authorization: Bearer $API_TOKEN"GET /api/walkthroughs/engage
The account's in-app kit.
- Endpoint id:
walkthrough-engage - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
What bana.js shows on the account's sites besides walkthroughs: the onboarding checklist (title, items each with an action (tour, video, link, none) and a done rule (auto, visit, click, event, manual), the pages and sites it shows on, autoOpen, celebrate), the announcements (a banner, card or modal with a badge, title, body, optional picture or video, an optional button, and who sees it: audience, traits, pages, sites, start, end, frequency, delay, listed in What's new), the assistant (the Ask box, AI answers, help for stuck visitors: stuck, idle seconds) analytics (forward events to the site's own analytics) and feedback (the surveys, up to 5 feedback buttons, and a throttle: a visitor is asked at most one survey in that many days). Each announcement, survey and button can also be read and changed on its own: see “Announcements, surveys and feedback buttons (one at a time)”. saved is false until the account saved a kit.
Responses
| Status | Meaning |
|---|---|
200 | { engage, saved }. |
Example
curl "https://www.bana.video/api/walkthroughs/engage" \
-H "Authorization: Bearer $API_TOKEN"PUT /api/walkthroughs/engage
Keep the account's in-app kit.
- Endpoint id:
walkthrough-engage-save - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
The kit has five parts: checklist, announcements, assistant, analytics and feedback. A part left out keeps what is saved (this example changes the checklist, the announcements and the assistant, and keeps the surveys and the feedback buttons as they are); a part that is sent replaces that part as a whole, and the fields left out inside it take their default. To change one announcement, survey or button without sending the rest, use /api/walkthroughs/engage/{collection}/{id}: it is applied to what is saved at that moment, so it never wipes out a change made elsewhere. Links may only be a page of the site, a #bana-… link or an http(s) address; pictures https. Sites with the script have it within a couple of minutes (see GET /api/public/walkthroughs for how long the public list is cached).
Responses
| Status | Meaning |
|---|---|
200 | { engage, saved: true }: the whole kit as it is now saved. |
400 | A field is not valid: the first problem is in the message, all of them in details.problems, each naming its field (checklist.items[2].title is needed.). |
Example
curl -X PUT "https://www.bana.video/api/walkthroughs/engage" \
-H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" -d '{"checklist":{"enabled":true,"title":"Get started","items":[{"id":"tour","title":"Take the tour","action":{"kind":"tour","tour":"page"}},{"id":"invite","title":"Invite a teammate","done":{"kind":"event","name":"invite-sent"}}]},"announcements":[{"id":"dark-mode","style":"card","title":"Dark mode is here","cta":{"label":"Show me","action":{"kind":"tour","tour":"page"}}}],"assistant":{"ask":true,"ai":true}}'POST /api/walkthroughs/assist
Try a question in the Ask box of one of the account's sites.
- Endpoint id:
walkthrough-assist-try - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
{ question, site, ai }: what a visitor of site (an origin) would get, from the account's live walkthroughs for it. With ai the AI writes the answer, from the account's AI allowance (about 2,000 tokens a question at most). When the AI was asked but did not answer, aiError says why: not_configured, busy, allowance, timeout, failed.
Responses
| Status | Meaning |
|---|---|
200 | { answer, guide, step, hits, ai, limited?, aiError? } as POST /api/public/assist answers. |
Example
curl -X POST "https://www.bana.video/api/walkthroughs/assist" \
-H "Authorization: Bearer $API_TOKEN" -H "Content-Type: application/json" -d '{"question":"How do I invite someone?","site":"https://app.example.com","ai":false}'GET /api/walkthroughs/wordpress-plugin
A WordPress plugin with the account's site key.
- Endpoint id:
walkthrough-wordpress - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
A ZIP to upload in WordPress (Plugins → Add New → Upload Plugin): it adds the script with the site key to every page, and tells it the role and language of a signed-in user (and a hash of their id). Settings → Videobana changes the key.
Responses
| Status | Meaning |
|---|---|
200 | The ZIP (application/zip). |
Example
curl -OJ "https://www.bana.video/api/walkthroughs/wordpress-plugin" \
-H "Authorization: Bearer $API_TOKEN"Not in the guide: Live walkthroughs (what bana.js reads)
Public, and open to every site (CORS *). Only live walkthroughs answer, or one that is not live yet with its preview token. They carry no screenshots and nothing of the account.
Public walkthrough
| Field | What it is |
|---|---|
id | 16 hexadecimal characters. |
title | Its title. |
description | Present when it has one. |
origin | The site it is for. |
startPath | The page it starts on. |
mode | show or try: show plays by itself like a video; try waits for the visitor to do each action on the real page. |
advance | auto or manual, for the voice walkthrough: auto goes on once a step has been said; manual waits for Next. |
textAdvance | auto or manual, for the text-only walkthrough: manual waits for Next; auto goes on once a step has been up long enough to read (textSeconds, or the time its words take to read). |
textSeconds | Present when set: the seconds each text-only step stays when it goes on by itself. |
textOnly | Also offered as a text-only walkthrough (no sound, all the text at once), with a button on the card to switch to it. Always the case when there is no voice. |
startWith | voice or text: the way it starts in when both are offered. A visitor who switches keeps their own choice, and it wins. |
autostart | Starts by itself when the page it starts on opens, for visitors who have not finished, closed or skipped it; one who left half way continues where they were. |
listed | Listed in the help button of the page. |
voice | { kind, lang?, audioUrl? }: audio (a recording that says the steps as they are, at audioUrl), browser (the visitor's browser voice) or none (text only). A standard or premium voice that is missing or out of date plays as text only. |
steps | Each step: action (none, click, type, keys), perform, placement, and when set title, text, say (a step needs at least one of these three), kind (intro, outro), target (a CSS selector), label, tag, path, type, keys, and audio ({ start, end } in the recording). No screenshots and nothing of the account. |
GET /api/public/walkthroughs
The live walkthroughs of an account for one site.
- Endpoint id:
public-walkthroughs - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
What bana.js loads with data-key: the account's live walkthroughs made for the site asking (its Origin, or ?origin=). An unknown key, or no key or origin, answers an empty list. Asking notes the site as installed on the dashboard. A browser may keep an answer for 60 seconds (Vary: Origin); shared caches (a CDN) may keep it for 30 seconds, and only when the address names the site with origin= (bana.js does) and the browser's Origin says the same.
Query parameters and headers
| Field | Type | Required | Description |
|---|---|---|---|
key | string | yes | The account's site key (bk_…, from GET /api/walkthroughs or the Walkthroughs page of the dashboard): what bana.js sends as data-key. |
origin | string | no | The site asking, as https://host[:port]. The browser's Origin header wins over it; give it when your own server asks. |
Responses
| Status | Meaning |
|---|---|
200 | { walkthroughs: [public walkthrough, …], appearance, engage }: appearance is the look the account chose for its walkthroughs (colours, cards, the Guides button), and engage its in-app kit for this site (the checklist, the announcements that are on and not over, the assistant's switches, analytics, the surveys and feedback buttons that are on): appearance is null until chosen, and engage is the standard kit until the account saves its own. With &via=preview (the Chrome extension trying them on a site) the site is not noted as installed. |
Example
curl "https://www.bana.video/api/public/walkthroughs?key=bk_YOUR_SITE_KEY&origin=https%3A%2F%2Fapp.example.com"GET /api/public/walkthroughs/{id}
One walkthrough as bana.js plays it.
- Endpoint id:
public-walkthrough - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
Live walkthroughs may be cached for 60 seconds; with preview nothing is cached.
Query parameters and headers
| Field | Type | Required | Description |
|---|---|---|---|
preview | string | no | The previewToken of a walkthrough that is not live yet, to test it on its site. |
Responses
| Status | Meaning |
|---|---|
200 | { walkthrough }. |
404 | Unknown, or not live and no matching preview token. |
Example of the 200 answer:
{
"walkthrough": {
"id": "4f0c2a9d81b3e657",
"title": "Invite a teammate",
"description": "How to add someone to your team.",
"origin": "https://app.example.com",
"startPath": "/settings/team",
"mode": "show",
"advance": "auto",
"textAdvance": "auto",
"textSeconds": 6,
"textOnly": true,
"startWith": "voice",
"autostart": false,
"listed": true,
"voice": {
"kind": "audio",
"audioUrl": "/api/public/walkthroughs/4f0c2a9d81b3e657/audio"
},
"steps": [
{
"target": "#invite-button",
"label": "Invite",
"tag": "button",
"path": "/settings/team",
"title": "Open the invite form",
"text": "Everyone you invite joins this workspace.",
"action": "click",
"perform": true,
"placement": "bottom",
"audio": {
"start": 0.1,
"end": 3.2
}
},
{
"target": "input[name=email]",
"label": "Email",
"tag": "input",
"path": "/settings/team",
"title": "Type their email",
"action": "type",
"type": "sam@example.com",
"perform": false,
"placement": "auto",
"audio": {
"start": 3.5,
"end": 5.4
}
}
]
}
}Example
curl "https://www.bana.video/api/public/walkthroughs/4f0c2a9d81b3e657"GET /api/public/walkthroughs/{id}/audio
The recorded voice of a walkthrough (MP3).
- Endpoint id:
public-walkthrough-audio - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
The voice.audioUrl of a public walkthrough points here; each step plays its audio part (start to end, in seconds).
Query parameters and headers
| Field | Type | Required | Description |
|---|---|---|---|
preview | string | no | The previewToken, for a walkthrough that is not live yet. |
Responses
| Status | Meaning |
|---|---|
307 | Redirect to the MP3 in storage, while the recording says the steps as they are. |
404 | Not playable (see above), or no current recording. |
Example
curl -I "https://www.bana.video/api/public/walkthroughs/4f0c2a9d81b3e657/audio"POST /api/public/walkthroughs/{id}/events
Count what a visitor did with a live walkthrough.
- Endpoint id:
walkthrough-events - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
Sent by bana.js with sendBeacon (the JSON as text, so no preflight is needed). kind is start, step (a step was reached), complete or dismiss (closed at step); page is the address it started on. Only live walkthroughs are counted, and only events from the walkthrough's own site when the browser names one. Nothing identifies the visitor.
Request body (an example):
{
"kind": "start",
"step": -1,
"page": "https://app.example.com/settings/team"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
kind | enum | yes | start, step (a step was reached), complete (the end was reached) or dismiss (closed early). Allowed: start, step, complete, dismiss. |
step | integer | no | The step, from 0 (-1 when it is about the whole walkthrough). Limits: -1–100. |
page | string | no | The page it happened on (kept for start, without its query string). Limits: up to 2000 characters. |
Responses
| Status | Meaning |
|---|---|
204 | Always, whether the event was counted or not (and whatever the body was). |
Example
curl -X POST "https://www.bana.video/api/public/walkthroughs/4f0c2a9d81b3e657/events" \
-d '{"kind":"complete"}'POST /api/public/assist
Answer a question in the Ask box of a site's Guides panel.
- Endpoint id:
public-assist - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
Sent by bana.js as text (no preflight): { key, question, page }. Searches the words of every step of the account's live walkthroughs for the site asking (its Origin) and answers with the best (guide) and the step that answers (step, from 0), so the visitor can start right there. When the account turned AI answers on, the AI also writes answer, in two or three sentences, only from those walkthroughs (the best matches in full or, when no words match, every live walkthrough by its titles): paid from the account's AI allowance, limited per visitor and per site, and the same question is answered from memory. limited says the AI was not asked this time; aiError why it did not answer (not_configured, busy, allowance, timeout, failed). A question or page address longer than allowed is cut. Nothing about the visitor is kept.
Request body (an example):
{
"key": "bk_YOUR_SITE_KEY",
"question": "How do I invite someone?",
"page": "/team"
}Responses
| Status | Meaning |
|---|---|
200 | { answer, guide, step, hits: [{ kind, id, title, score, step, snippet }], ai, limited?, aiError? }. |
400 | No key, or a question shorter than 2 characters (a longer one than 200 is cut). |
404 | Unknown site key, or no Origin. |
Example
curl -X POST "https://www.bana.video/api/public/assist" -H "Origin: https://app.example.com" -d '{"key":"bk_YOUR_SITE_KEY","question":"How do I invite someone?","page":"/team"}'Not in the guide: Interactive demos (what /try/{id} plays)
A walkthrough shared as an interactive demo (PUT /api/walkthroughs/{id} with { demo: { shared: true } }) is open to anyone with its link; one that is not shared answers only with its preview token. Its page is /try/{id}, its embed /embed/try/{id}, and GET /api/oembed?url=…/try/{id} gives the iframe.
GET /api/public/demos/{id}
A shared walkthrough as an interactive demo.
- Endpoint id:
public-demo - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
The steps with the screenshot each shows (its own, else the last one; own says which, and a step without its own is about the whole page), where its pointer clicks (click) and its area (focus, in percent of the picture), the words, the ending's button (cta), the account's colours, and the address of the page it shows (host). The screenshots' addresses point to copies with the hidden areas burned in. Shared demos may be cached for 60 seconds; with preview nothing is cached.
Responses
| Status | Meaning |
|---|---|
200 | { demo: { id, title, description?, host, steps: [{ kind?, title?, text?, say?, action, type?, keys?, shot: { src, focus, click?, page? }, own }], cta, accent, accent2, preview } }. |
404 | Unknown, not shared and no matching preview token, or no step has a screenshot. |
Example
curl "https://www.bana.video/api/public/demos/4f0c2a9d81b3e657"GET /api/public/demos/{id}/shots/{assetId}
A screenshot of a demo, with its hidden areas burned in.
- Endpoint id:
public-demo-shot - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
Every area any step hid on the screenshot is painted over (cover) or shrunk and smudged past reading (blur) in the picture itself, so nothing hidden can be recovered from the address. Only a screenshot one of the demo's steps uses. WebP, remembered for ten minutes (v in the address changes with the hidden areas).
Responses
| Status | Meaning |
|---|---|
200 | The picture (image/webp). |
404 | Not shared (and no preview token), or not one of its screenshots. |
Example
curl -o shot.webp "https://www.bana.video/api/public/demos/4f0c2a9d81b3e657/shots/{assetId}"GET /api/public/demos/{id}/poster
The poster of a shared demo, for link previews.
- Endpoint id:
public-demo-poster - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
Its first screenshot with the hidden areas burned in, as a JPEG (which every link preview reads, unlike WebP), at most as wide as a link preview shows it. Only while the demo is shared; remembered for a minute (v in the address changes with the hidden areas). The demo's page and GET /api/oembed point to it.
Responses
| Status | Meaning |
|---|---|
200 | The picture (image/jpeg). |
404 | Not shared, or no step has a screenshot. |
Example
curl -o poster.jpg "https://www.bana.video/api/public/demos/4f0c2a9d81b3e657/poster"POST /api/public/demos/{id}/events
Count what a viewer did with a shared demo.
- Endpoint id:
public-demo-events - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
Sent by the player with sendBeacon (as text), each at most once per viewing: kind is view (opened), start (Start pressed), step (the step reached, from 0), done (the end reached) or cta (its button). Only shared demos are counted, only from this site's own pages (the demo page and its embed: another Origin is refused), and at most 60 events a minute and 400 an hour from one address per demo; its owner's views (preview token, or signed in) are not counted. Nothing identifies the viewer. The numbers are in GET /api/walkthroughs/{id}/stats under demo.
Request body (an example):
{
"kind": "step",
"step": 2
}Responses
| Status | Meaning |
|---|---|
204 | Always, whether it was counted or not. |
Example
curl -X POST "https://www.bana.video/api/public/demos/4f0c2a9d81b3e657/events" -d '{"kind":"view"}'Not in the guide: Announcements, surveys and feedback buttons (one at a time)
Each announcement, survey and feedback button of the account's in-app kit (see GET /api/walkthroughs/engage) can be listed, made, changed, copied, deleted and measured on its own, without sending the whole kit. {collection} is announcements, surveys or buttons; an account can have up to 20 announcements, 12 surveys and 5 feedback buttons. An item has the fields of its kind as the kit shows them, plus id (made by the server and kept for good: what visitors did is kept by it), name (what the account calls it; visitors never see it), enabled, and createdAt and updatedAt (dated by the server: what is sent for them is ignored). Every change is applied to what is saved at that moment, so two callers at once never wipe out each other's, and sites with the script have it within a couple of minutes. A change that is not valid is refused with 400 and nothing is saved: the message names the first problem and error.details.problems lists them all.
GET /api/walkthroughs/engage/{collection}
List the announcements, surveys or feedback buttons, with how each is doing.
- Endpoint id:
engage-list - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Every item of the kind as it is kept, with its summary over the last days days: shown (how often it was shown; a button: opened), acted (what visitors did with it: an announcement's button pressed, a survey answered, a message sent), rate (acted per shown, null before it was shown), score (a survey's NPS, average or share of 👍; null for the others and before an answer), unread (answers and messages nobody opened yet, of all time) and trend (how often it was shown on each of the last 14 days, oldest first). limit is how many of the kind the account can have.
Query parameters and headers
| Field | Type | Required | Description |
|---|---|---|---|
days | integer | no | The period the numbers of each item are over, in days back from today. Default 30; a value that is not a whole number from 7 to 90 counts as 30. Limits: 7–90. |
Responses
| Status | Meaning |
|---|---|
200 | { items: [{ item, summary }, …], limit }. |
404 | {collection} is none of announcements, surveys and buttons. |
Example of the 200 answer:
{
"items": [
{
"item": "{ … the survey … }",
"summary": {
"shown": 240,
"acted": 58,
"rate": 0.24,
"score": 31,
"unread": 4,
"trend": [
12,
9,
14,
18,
10,
7,
11,
19,
21,
8,
12,
15,
17,
16
]
}
}
],
"limit": 12
}Example
curl "https://www.bana.video/api/walkthroughs/engage/surveys?days=30" \
-H "Authorization: Bearer $API_TOKEN"POST /api/walkthroughs/engage/{collection}
Make an announcement, a survey or a feedback button.
- Endpoint id:
engage-create - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
What is left out takes the standard of its kind: a survey sent only { "kind": "nps" } comes with its question, scale labels and thank-you; a button comes with the kinds Idea, Problem, Praise and Question. It starts enabled, so it is live on its sites at once: send enabled: false to keep it as a draft. An announcement needs a title, a survey a question. Its id is made by the server.
Request body (an example):
{
"title": "Dark mode is here",
"body": "Switch it on in Settings.",
"badge": "New",
"cta": {
"label": "Show me",
"action": {
"kind": "link",
"url": "/settings",
"newTab": false
}
}
}Responses
| Status | Meaning |
|---|---|
201 | { item }, as kept. |
400 | A field is not valid, or the account has as many of the kind as it can have (20 announcements, 12 surveys, 5 feedback buttons). |
Example
curl -X POST "https://www.bana.video/api/walkthroughs/engage/announcements" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "Dark mode is here",
"body": "Switch it on in Settings.",
"badge": "New"
}'PATCH /api/walkthroughs/engage/{collection}
Change what belongs to all the surveys.
- Endpoint id:
engage-settings - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Only surveys have any: throttle, the days between two surveys for one visitor, whichever they are (0: only each survey's own rules; at most 30). Applied to what is saved at that moment, like every change here.
Request body (an example):
{
"throttle": 14
}Responses
| Status | Meaning |
|---|---|
200 | { settings: { throttle } }, as kept. |
400 | {collection} is not surveys, or throttle is not a whole number of days in range. |
Example
curl -X PATCH "https://www.bana.video/api/walkthroughs/engage/surveys" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"throttle": 14
}'GET /api/walkthroughs/engage/{collection}/{id}
Read one announcement, survey or feedback button.
- Endpoint id:
engage-get - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Responses
| Status | Meaning |
|---|---|
200 | { item }. |
404 | No such item. |
Example
curl "https://www.bana.video/api/walkthroughs/engage/surveys/survey-1a2b3c4d" \
-H "Authorization: Bearer $API_TOKEN"PUT /api/walkthroughs/engage/{collection}/{id}
Replace an item with what is sent.
- Endpoint id:
engage-replace - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
The fields sent are the whole of the item: what is left out takes its default (use PATCH to change only some). Its id, createdAt and updatedAt stay as the server has them.
Request body (an example):
{
"question": "How likely are you to recommend us?",
"lowLabel": "Not likely",
"highLabel": "Very likely",
"kind": "nps",
"enabled": true
}Responses
| Status | Meaning |
|---|---|
200 | { item }, as kept. |
400 | A field is not valid. |
404 | No such item. |
Example
curl -X PUT "https://www.bana.video/api/walkthroughs/engage/surveys/survey-1a2b3c4d" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"kind": "nps",
"question": "How likely are you to recommend us?",
"enabled": true
}'PATCH /api/walkthroughs/engage/{collection}/{id}
Change some fields of an item, or switch it on or off.
- Endpoint id:
engage-update - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Only the fields sent change; a field that holds an object (an announcement's cta, a survey's followUp or thanks) is replaced as a whole. updatedAt moves only when something changed.
Request body (an example):
{
"enabled": false
}Responses
| Status | Meaning |
|---|---|
200 | { item }, as kept. |
400 | A field is not valid. |
404 | No such item. |
Example
curl -X PATCH "https://www.bana.video/api/walkthroughs/engage/surveys/survey-1a2b3c4d" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": false
}'DELETE /api/walkthroughs/engage/{collection}/{id}
Delete an item and its counts.
- Endpoint id:
engage-delete - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Its counts are deleted with it; the answers and messages visitors sent through it stay in the inbox (delete them there). This cannot be undone.
Responses
| Status | Meaning |
|---|---|
204 | Deleted. |
404 | No such item. |
Example
curl -X DELETE "https://www.bana.video/api/walkthroughs/engage/surveys/survey-1a2b3c4d" \
-H "Authorization: Bearer $API_TOKEN"POST /api/walkthroughs/engage/{collection}/{id}/duplicate
Copy an item.
- Endpoint id:
engage-duplicate - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
The copy has a new id, the name with “ (copy)” added, and is off until you switch it on. Counts and answers are not copied.
Responses
| Status | Meaning |
|---|---|
201 | { item }: the copy. |
400 | The account has as many of the kind as it can have. |
404 | No such item. |
Example
curl -X POST "https://www.bana.video/api/walkthroughs/engage/surveys/survey-1a2b3c4d/duplicate" \
-H "Authorization: Bearer $API_TOKEN"GET /api/walkthroughs/engage/{collection}/{id}/stats
One item's numbers over a period.
- Endpoint id:
engage-stats - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
{ kind, stats }, where stats is, for an announcement, { days, views, clicks, dismissals, clickRate, dismissRate, daily: [{ day, views, clicks, dismissals }] }; for a survey, { days, result, dismissals, dismissRate, daily: [{ day, views, answers, dismissals }], pages: [{ page, count }] } (result is as one survey of GET /api/feedback/summary); for a button, { days, opens, messages, sendRate, withScreenshot, kinds: [{ id, label, count }], daily: [{ day, opens, messages }], pages }. daily has one entry per day, oldest first, with zeros for days nothing happened. Rates are 0 to 1, null before the item was shown. Days are UTC days. The answers and messages themselves are in the inbox: GET /api/feedback?source=survey:<id> or source=button:<id>.
Query parameters and headers
| Field | Type | Required | Description |
|---|---|---|---|
days | integer | no | The period, in days back from today. Default 30; a value that is not a whole number from 7 to 90 counts as 30. Limits: 7–90. |
Responses
| Status | Meaning |
|---|---|
200 | { kind, stats }. |
404 | No such item. |
Example
curl "https://www.bana.video/api/walkthroughs/engage/announcements/news-1a2b3c4d/stats?days=7" \
-H "Authorization: Bearer $API_TOKEN"Not in the guide: Surveys and feedback (the inbox)
What the visitors of the account's sites answered to its surveys and sent with its feedback button (set under feedback in the kit: surveys, buttons, throttle; or one at a time with /api/walkthroughs/engage/{collection}, which also answers each one's numbers). An entry is { id, kind: "survey" | "feedback", source (the survey's or kind of feedback's id), button (the id of the feedback button a message came through, null for an answer), label, surveyKind, status: "open" | "resolved" | "archived", read, score, band: "low" | "mid" | "high", choices, text, email, origin, page, visitor: { id, traits }, context: { title, viewport, dpr, language, timezone, theme, errors, trail, element, sdk, tour }, environment: { browser, os, device }, hasShot, tour: { id, title } | null (the walkthrough a survey was answered after), createdAt }. No IP address or raw browser string is kept; a page keeps its path only.
GET /api/feedback
List answers and messages, newest first.
- Endpoint id:
feedback-list - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Filters: status (open by default, resolved, archived or all), source (feedback for every message, surveys for every answer, survey:<id>, button:<id> for the messages of one feedback button, or category:<id>), q (words, an email, a page or a user id), days (90 by default, 0 for all time) and limit (50, at most 200). next is the cursor of the following page, null at the end. The first page (no cursor) also has counts: how many entries of that source are in each status, and how many open ones nobody opened yet, of all time and whatever the other filters are.
Responses
| Status | Meaning |
|---|---|
200 | { entries: [entry, …], next, counts: { open, resolved, archived, unread } | null }: counts is null on the pages after the first. |
Example
curl "https://www.bana.video/api/feedback?status=open&source=feedback&days=30" \
-H "Authorization: Bearer $API_TOKEN"PATCH /api/feedback
Resolve, archive, reopen or mark several entries.
- Endpoint id:
feedback-bulk - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
{ ids, status?, read? } (at most 200 ids). Entries that are not the account's are left alone.
Request body (an example):
{
"ids": [
"0123456789abcdef"
],
"status": "resolved"
}Responses
| Status | Meaning |
|---|---|
200 | { updated }: how many were changed. |
Example
curl -X PATCH "https://www.bana.video/api/feedback" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"0123456789abcdef"
],
"status": "resolved"
}'DELETE /api/feedback
Delete several entries and their screenshots.
- Endpoint id:
feedback-bulk-delete - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
{ ids }. This cannot be undone.
Responses
| Status | Meaning |
|---|---|
200 | { deleted }. |
Example
curl -X DELETE "https://www.bana.video/api/feedback" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"0123456789abcdef"
]
}'GET /api/feedback/{id}
One entry, with its screenshot.
- Endpoint id:
feedback-get - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
The entry and shotUrl, an address of its screenshot that works for 15 minutes (null without one). Opening it marks it read.
Responses
| Status | Meaning |
|---|---|
200 | { entry: { …entry, shotUrl } }. |
404 | Not one of the account's. |
Example
curl "https://www.bana.video/api/feedback/0123456789abcdef" \
-H "Authorization: Bearer $API_TOKEN"PATCH /api/feedback/{id}
Resolve, archive or reopen an entry, or mark it read or unread.
- Endpoint id:
feedback-update - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
{ status?, read? }.
Request body (an example):
{
"status": "archived"
}Responses
| Status | Meaning |
|---|---|
200 | { entry }. |
Example
curl -X PATCH "https://www.bana.video/api/feedback/0123456789abcdef" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"status": "archived"
}'DELETE /api/feedback/{id}
Delete an entry and its screenshot.
- Endpoint id:
feedback-delete - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
This cannot be undone.
Responses
| Status | Meaning |
|---|---|
204 | Deleted. |
Example
curl -X DELETE "https://www.bana.video/api/feedback/0123456789abcdef" \
-H "Authorization: Bearer $API_TOKEN"GET /api/feedback/{id}/shot
Go to an entry's screenshot.
- Endpoint id:
feedback-shot - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Redirects to the screenshot (WebP, private areas already blurred in the visitor's browser) for 15 minutes; ?download=1 saves it as a file.
Responses
| Status | Meaning |
|---|---|
302 | To the picture. |
404 | No screenshot, or not one of the account's. |
Example
curl -L -o shot.webp "https://www.bana.video/api/feedback/0123456789abcdef/shot?download=1" \
-H "Authorization: Bearer $API_TOKEN"GET /api/feedback/summary
How each survey is doing.
- Endpoint id:
feedback-summary - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
Over ?days= (30 by default, at most 365; archived entries left out): per survey its answers, views and response rate, its score (NPS from -100 to 100, the average of a scale, or the share of 👍), the answers per score, the bands (low, mid, high), a poll's choices, the trend per week and how many answers have words; and the messages per kind of feedback, with the open and unread counts.
Responses
| Status | Meaning |
|---|---|
200 | { summary: { days, open, unread, total, surveys: [{ survey, kind, label, answers, views, rate, score, distribution, bands, choices, weekly, comments }], categories: [{ id, label, count }] } }. |
Example
curl "https://www.bana.video/api/feedback/summary?days=90" \
-H "Authorization: Bearer $API_TOKEN"GET /api/feedback/export
The entries as a CSV file.
- Endpoint id:
feedback-export - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
The same filters as GET /api/feedback (at most 10,000 rows, newest first), with the columns id, created_at, kind, source, label, score, band, choices, text, email, status, site, page, user_id, traits, browser, os, device, walkthrough (walkthrough: the title of the walkthrough a survey was answered after). Values that a spreadsheet would read as a formula are prefixed with '.
Responses
| Status | Meaning |
|---|---|
200 | text/csv, as an attachment. |
Example
curl -o feedback.csv "https://www.bana.video/api/feedback/export?status=all&days=0" \
-H "Authorization: Bearer $API_TOKEN"POST /api/feedback/insights
Find the themes in what visitors wrote, with AI.
- Endpoint id:
feedback-insights - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
{ source?, days }: the entries with words the filters match (at most 150 are read), grouped into themes with how many answers each has and quotes copied from them, an overall sentiment and next steps. From the account's AI allowance; the same entries are answered from memory for an hour.
Request body (an example):
{
"source": "survey:nps",
"days": 30
}Responses
| Status | Meaning |
|---|---|
200 | { insights: { summary, sentiment, themes: [{ title, detail, count, tone, quotes }], actions, read } }. |
400 | Fewer than three answers with words. |
402 | The AI allowance is used up. |
Example
curl -X POST "https://www.bana.video/api/feedback/insights" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"source": "survey:nps",
"days": 30
}'Not in the guide: Surveys and feedback (what bana.js sends)
Public, open to every site (CORS *), and sent as text so no preflight is needed. Each request carries the account's site key and is checked against its setup for the site in the Origin header: a survey that is off or not for that site, a kind of feedback the button does not have or a button that is off, or more than people could send (per address and account: 20 a minute, 200 an hour and 30 screenshots an hour; 2,000 entries a day per account) is refused with a message a visitor can read. A page address, a title or other details of the page that are too long are cut, not refused. A website field is a trap for robots: a request that fills it in is answered as if kept, and dropped.
POST /api/public/feedback
Send a survey's answer or a feedback message.
- Endpoint id:
public-feedback-send - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
A survey: { key, kind: "survey", survey, score?, choices?, text?, page, visitor?, context?: { tour: { id, title } } } (a score on the survey's scale: NPS 0–10, satisfaction 1–5, effort 1–7, helpful 0 or 1; a poll's own choices; context.tour the walkthrough it was answered after). A message: { key, kind: "feedback", button?, category, text, email?, page, visitor?, context?, shot? }, where button is the id of the feedback button the form came from (a message that names none, or one that is gone, is taken as the first button that is on for the site; the kind of feedback must be one of that button's) and shot is a data address of a WebP, JPEG or PNG (at most 2 MB; kept as WebP of at most 1920 pixels a side, without metadata). visitor is { id, traits } as the site gave them to Bana.identify. The token lets the same visitor add the follow-up for 30 minutes.
Request body (an example):
{
"key": "bk_…",
"kind": "survey",
"survey": "nps",
"score": 9,
"page": "/dashboard"
}Responses
| Status | Meaning |
|---|---|
201 | { id, token }. |
400 | The answer does not fit the survey, the kind of feedback is unknown, the words or the email are missing or wrong. |
404 | Unknown site key, no such survey for this site, or the feedback button is off there. |
413 | The screenshot is too large. |
429 | Too many at once (too_many_requests). |
Example
curl -X POST "https://www.bana.video/api/public/feedback" -H "Origin: https://app.example.com" -d '{"key":"bk_…","kind":"feedback","category":"bug","text":"The export button does nothing","page":"/reports"}'POST /api/public/feedback/amend
Add the follow-up's words to an answer.
- Endpoint id:
public-feedback-amend - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
{ key, id, token, text }, with the receipt of POST /api/public/feedback, within 30 minutes and once (empty words: the visitor closed it). Sent with sendBeacon when the visitor leaves the page with the follow-up open.
Request body (an example):
{
"key": "bk_…",
"id": "0123456789abcdef",
"token": "…",
"text": "Faster exports, please"
}Responses
| Status | Meaning |
|---|---|
204 | Added. |
404 | Not this visitor's answer. |
Example
curl -X POST "https://www.bana.video/api/public/feedback/amend" -H "Origin: https://app.example.com" -d '{"key":"bk_…","id":"0123456789abcdef","token":"…","text":"Faster exports, please"}'POST /api/public/feedback/events
Count a survey being shown or closed.
- Endpoint id:
public-feedback-events - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
{ key, survey, kind: "view" | "dismiss" }, per day, for the response rate in GET /api/feedback/summary. Nothing identifies the visitor. Older copies of bana.js send this; the current one sends POST /api/public/engage/events, which also counts announcements and feedback buttons. Both are counted the same way.
Request body (an example):
{
"key": "bk_…",
"survey": "nps",
"kind": "view"
}Responses
| Status | Meaning |
|---|---|
204 | Always, whether it was counted or not. |
Example
curl -X POST "https://www.bana.video/api/public/feedback/events" -H "Origin: https://app.example.com" -d '{"key":"bk_…","survey":"nps","kind":"view"}'POST /api/public/engage/events
Count what a visit did with announcements, surveys and feedback buttons.
- Endpoint id:
public-engage-events - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
{ key, events: [{ kind, item, event }, …] }, at most 20 events: kind is announcement (events view, click, dismiss), survey (view, dismiss) or button (open), and item its id. bana.js sends what one visit did in one request. What is counted is checked against the account's kit for the site in the Origin header: an item that does not exist, is off or is not for that site is ignored, and so is an event the kind does not have. Counted per day (UTC); nothing identifies the visitor. They are the numbers of each item's page (GET /api/walkthroughs/engage/{collection}/{id}/stats). Sent as text so no preflight is needed.
Request body (an example):
{
"key": "bk_…",
"events": [
{
"kind": "announcement",
"item": "news-1a2b3c4d",
"event": "view"
},
{
"kind": "button",
"item": "feedback",
"event": "open"
}
]
}Responses
| Status | Meaning |
|---|---|
204 | Always, whether it was counted or not (too many from one address are dropped without a word). |
Example
curl -X POST "https://www.bana.video/api/public/engage/events" -H "Origin: https://app.example.com" -d '{"key":"bk_…","events":[{"kind":"announcement","item":"news-1a2b3c4d","event":"view"}]}'Not in the guide: Other public endpoints
Need no token.
GET /api/examples/voices/{fingerprint}/audio
The voice-over of a demo (MP3).
- Endpoint id:
example-voice - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
The audioUrl of GET /api/examples/{id} points here. Served by this server itself (no redirect), with Range support, and cached for a year: the fingerprint names the exact words and voice, so what it points to never changes. Open to every site (CORS *).
Responses
| Status | Meaning |
|---|---|
200 | The MP3 (audio/mpeg); 206 for a Range request, 416 for a range that cannot be served. |
404 | No such voice-over. |
Example
curl -o example.mp3 "https://www.bana.video/api/examples/voices/3cc982906520/audio"GET /api/me
Who is signed in, for a page's top bar.
- Endpoint id:
me - Auth: None. Anyone may call it; no token is read (an
Authorizationheader is ignored).
Reads only the browser's session cookie: with a token, or for a visitor or a deactivated account, user is null. Not cached.
Responses
| Status | Meaning |
|---|---|
200 | { user: { name, email, role } } (role is admin or user), or { user: null }. While an administrator is signed in as a user, it is that user, with impersonating: true. |
Example
curl "https://www.bana.video/api/me"Not in the guide: Dashboard settings, internal and administrator endpoints
Listed so nothing is a surprise. Only the first one accepts an API token, and it is meant for the dashboard's own settings. The two that give a video or a walkthrough to another account answer only the signed-in browser of the person who owns it: a token is answered 403.
PUT /api/preferences/{key}
Remember a setting of the dashboard.
- Endpoint id:
preferences - Auth: An API token (
Authorization: Bearer <token>orx-api-key: <token>), or the session cookie of a signed-in browser on this site. It acts on the account the token belongs to.
What the dashboard's pages remember for the signed-in user, as short texts: editor-view (up to 100 characters), editor-tab (up to 100 characters), timeline-zoom (up to 100 characters), editor-dock (up to 100 characters), captions (up to 10 characters), export-settings (up to 20,000 characters), ai-settings (up to 20,000 characters), brand-kit (up to 5,000 characters), create-draft (up to 900,000 characters), ad-draft (up to 200,000 characters), walkthrough-sites (up to 6,000 characters). { "value": null } forgets the setting. There is no endpoint to read them back.
Request body (an example):
{
"value": "timeline"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
value | string | null | yes | The setting, as text (the page decides its format, often JSON); null forgets it. At most as long as its key allows. |
Responses
| Status | Meaning |
|---|---|
204 | Saved (or forgotten). |
400 | The value is longer than the key allows. |
404 | Not a known key. |
Example
curl -X PUT "https://www.bana.video/api/preferences/editor-view" \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"value": "timeline"
}'POST /api/videos/{id}/transfer
Give a video to another account (the dashboard's “Change ownership”).
- Endpoint id:
video-transfer - Auth: Only a person signed in with a browser session on this site, from this site's own pages. A token never opens it, whatever the account: it is answered 403
forbidden, because what these endpoints do cannot be undone.
The video keeps its id, so every link to it (the watch page, embeds, the public address) keeps working, and it keeps its visibility. It goes to the account that uses email, with everything it needs: the pictures, footage, music, audio clips, logo and voice-over it uses are copied to the new owner's own files. A file nothing else of yours uses any more is removed from your account (it moved); one that another video, a walkthrough or your brand kit still uses stays with you (it was copied), so those keep working. The exports you made of the video are not given: they are deleted with it, so download the ones you want first. You stop owning the video at once, and only the new owner can give it back. It is refused while an export or a voice-over recording of the video is running.
Request body (an example):
{
"email": "new.owner@example.com"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | The email address of the account that is to own it. Spaces around it and capitals do not matter. |
Responses
| Status | Meaning |
|---|---|
200 | { transfer: { kind, id, title, owner: { email }, files: { moved, copied } } }: moved files are no longer yours, copied ones are still used by something of yours. |
400 | Not an email address, or your own. |
403 | Called with an API token, or from another site. |
404 | Not your video, or no account that may be used has this email address (a deactivated account is not told apart from none). |
409 | An export or a voice-over recording of the video is running, or the video changed while it was being given. Nothing was changed: try again. |
503 | The files could not be copied. Nothing was changed: try again. |
Example of the 200 answer:
{
"transfer": {
"kind": "video",
"id": "b921df158655611f",
"title": "Why the sky is blue",
"owner": {
"email": "new.owner@example.com"
},
"files": {
"moved": 3,
"copied": 1
}
}
}Example
# Signed-in browser session only, from the dashboard's pages; a token is answered 403.POST /api/walkthroughs/{id}/transfer
Give a walkthrough to another account (the dashboard's “Change ownership”).
- Endpoint id:
walkthrough-transfer - Auth: Only a person signed in with a browser session on this site, from this site's own pages. A token never opens it, whatever the account: it is answered 403
forbidden, because what these endpoints do cannot be undone.
The same as for a video (POST /api/videos/{id}/transfer). The walkthrough keeps its id, its status, its counts and its recorded voice, and its screenshots are copied to the new owner. The guide video made from it goes with it, unless another walkthrough of yours still shows that video: then the video stays with you and the walkthrough has none. A live walkthrough stays live, but it is played from the new owner's site key from now on, so it stops appearing on your sites.
Request body (an example):
{
"email": "new.owner@example.com"
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
email | string | yes | The email address of the account that is to own it. Spaces around it and capitals do not matter. |
Responses
| Status | Meaning |
|---|---|
200 | { transfer }, as for a video, with kind walkthrough; files count the files of the guide video too. |
400 | Not an email address, or your own. |
403 | Called with an API token, or from another site. |
404 | Not your walkthrough, or no account that may be used has this email address. |
409 | An export or a voice-over recording of its guide video is running, or something changed while it was being given. Nothing was changed: try again. |
503 | The files could not be copied. Nothing was changed: try again. |
Example of the 200 answer:
{
"transfer": {
"kind": "walkthrough",
"id": "4f0c2a9d81b3e657",
"title": "Create a registry",
"owner": {
"email": "new.owner@example.com"
},
"files": {
"moved": 4,
"copied": 0
}
}
}Example
# Signed-in browser session only, from the dashboard's pages; a token is answered 403.POST /api/jobs/{id}/parts
Draw one part of a running export (internal).
- Endpoint id:
render-parts - Auth: Not for integrators. Only a running export calls it, proving itself with its own secret in the
x-render-tokenheader, which stops working when the export ends.
A long export has its parts drawn by several invocations of the server at once; the export calls this for each part with its own secret in x-render-token. Anything else is answered 401.
Responses
| Status | Meaning |
|---|---|
401 | The export is not running, or the token is not its own. |
Example
# Not callable from outside: the export sends its own x-render-token.GET /api/admin/videos/{id}/audio
The voice-over of any video, for an administrator's player.
- Endpoint id:
admin-audio - Auth: Only an administrator signed in with a browser session. A token never opens it, whoever it belongs to; anyone else is told 404.
Responses
| Status | Meaning |
|---|---|
307 | Redirect to the MP3. |
404 | Not an administrator's browser, or no current voice-over. |
Example
# Administrator's browser session only; a token is answered 404.GET /api/admin/videos/{id}/assets/{assetId}
A file of any video, for an administrator's player.
- Endpoint id:
admin-asset - Auth: Only an administrator signed in with a browser session. A token never opens it, whoever it belongs to; anyone else is told 404.
Responses
| Status | Meaning |
|---|---|
307 | Redirect to the file, while the video uses it. |
404 | Not an administrator's browser, or not a file of the video. |
Example
# Administrator's browser session only; a token is answered 404.POST /api/auth/{...path}
The browser's sign-in, sign-up, sign-out and session (all methods).
- Endpoint id:
auth - Auth: The browser's own sign-in, sign-up, sign-out and session calls, passed on to the sign-in service (Neon Auth). Not part of the API: a token does nothing here.
Passed on to the sign-in service (Neon Auth), which keeps the session in a signed cookie. While email sign-up is paused, calls that would create an account are answered 403 { "code": "EMAIL_SIGN_UP_PAUSED", "message": … }. Integrations use API tokens instead.
Responses
| Status | Meaning |
|---|---|
— | Whatever the sign-in service answers. |
Example
# Used by the sign-in pages of https://www.bana.video; not part of the API.Not in the guide: Render machines (what the program of a machine calls)
Not for integrators. A render machine is a computer (Linux, macOS or Windows, with Chrome and ffmpeg) that draws exports for this server; an administrator adds it in Admin > Render machines and gets its secret once. Its program (/worker/videobana-worker.mjs) only calls the server, never the other way round, with that secret in Authorization: Bearer vw_…. It says hello about once a minute, asks for an export every 3 seconds while it has room, reports every 2 seconds while it draws, puts the finished file in the storage at an address the server signed, and says it is complete, so the file never passes through the server. An export is on one machine at a time: claim gives it to the first machine that asks and marks it as that machine's, and every later call about it carries the attempt it was given. A job that was taken back (the machine fell silent for a minute, or an administrator took it back) and given to another has a higher attempt, and the calls of the earlier one are answered 409 conflict: the machine stops and forgets it. The protocol is version 1; a machine of another version is answered 426 and updates its program. Answers are never cached.
POST /api/worker/hello
Say what the machine is, and learn how to work.
- Endpoint id:
worker-hello - Auth: Not for integrators. Only the program of a render machine calls it, proving itself with the secret of that machine (
Authorization: Bearer vw_…, shown once when an administrator added the machine). A secret that is not known is answered 401, and a machine an administrator switched off 403. An API token or a browser session does nothing here.
Called when the program starts and about once a minute. It carries the version of the protocol and what the machine found on itself: its system, the versions of its browser and ffmpeg, and the formats it can draw (none, with the reason in problem, when something is missing). The administrators see this. The answer gives the name the administrator chose, the state (active; draining: finish what is drawn and take nothing new; disabled is answered 403 before this), how many exports the machine may draw at once (capacity) and how often to call (pollMs, heartbeatMs).
Request body (an example):
{
"protocol": 1,
"details": {
"hostname": "render-vm-1",
"platform": "linux",
"arch": "x64",
"os": "Ubuntu 24.04.1 LTS",
"cpuModel": "AMD EPYC 7B13",
"cpuCores": 8,
"memoryMb": 16384,
"agentVersion": "0.1.0",
"nodeVersion": "v22.18.0",
"chromeVersion": "Chrome/158.0.8127.37",
"ffmpegVersion": "7.1",
"formats": [
"mp4",
"mov",
"webm",
"gif"
],
"problem": null
}
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
protocol | integer | yes | Limits: 1–9007199254740991. |
details | object | yes | |
details.hostname | string | yes | Limits: up to 120 characters. |
details.platform | string | yes | Limits: up to 24 characters. |
details.arch | string | yes | Limits: up to 24 characters. |
details.os | string | yes | Limits: up to 120 characters. |
details.cpuModel | string | yes | Limits: up to 120 characters. |
details.cpuCores | integer | yes | Limits: 1–4096. |
details.memoryMb | integer | yes | Limits: 0–100000000. |
details.agentVersion | string | yes | Limits: up to 32 characters. |
details.nodeVersion | string | yes | Limits: up to 32 characters. |
details.chromeVersion | string | null | yes | Limits: up to 80 characters. |
details.ffmpegVersion | string | null | yes | Limits: up to 80 characters. |
details.formats | enum[] | yes | Allowed: mp4, webm, mov, gif, mp3, png, srt, vtt, json. Limits: up to 9 items. |
details.problem | string | null | no | Limits: up to 300 characters. |
Responses
| Status | Meaning |
|---|---|
200 | How to work. |
400 | The body is not what the protocol says (an unknown field is refused too). |
401 | The secret is not known: it was replaced, or the machine was removed. |
403 | An administrator switched this machine off. |
426 | The program speaks another version of the protocol. Update it (the installed service does this by itself when it starts again). |
Example of the 200 answer:
{
"name": "render-vm-1",
"state": "active",
"capacity": 2,
"pollMs": 3000,
"heartbeatMs": 2000
}Example
curl -X POST "https://www.bana.video/api/worker/hello" \
-H "Authorization: Bearer $WORKER_SECRET" \
-H "Content-Type: application/json" \
-d '{
"protocol": 1,
"details": "{ … }"
}'POST /api/worker/claim
Ask for an export to draw.
- Endpoint id:
worker-claim - Auth: Not for integrators. Only the program of a render machine calls it, proving itself with the secret of that machine (
Authorization: Bearer vw_…, shown once when an administrator added the machine). A secret that is not known is answered 401, and a machine an administrator switched off 403. An API token or a browser session does nothing here.
Gives the oldest export on the board that this machine can draw (its format, and a browser that works) and has room for, and marks it as this machine's: no other machine, and no server, takes it while this machine holds it. An export is on the board when the server that was asked for it found a machine that can draw it, and waits a few seconds for one to take it. order holds everything the machine needs: jobId, attempt, videoId, the export options (without the webhook address and the music), the duration the render page must show, renderPath (the page that draws the video, on this server, with a secret of this one export in it), progressFrom (how far the export had got: the voice is recorded first), audio (the narration as a file at a signed address, or null) and heartbeatMs. order is null when there is nothing to draw, or when the machine is told to finish up.
Responses
| Status | Meaning |
|---|---|
200 | { order, pollMs }: an order, or null and how long to wait before asking again. |
401 | The secret is not known. |
403 | An administrator switched this machine off. |
Example of the 200 answer:
{
"order": {
"jobId": "a1b2c3d4e5f60718",
"attempt": 2,
"videoId": "0123456789abcdef",
"options": {
"format": "mp4",
"resolution": "720p"
},
"duration": 31.5,
"renderPath": "/render/0123456789abcdef?job=a1b2c3d4e5f60718&token=…",
"progressFrom": 0.1,
"audio": {
"url": "https://storage.example.com/…?signature=…",
"name": "soundtrack.wav",
"bytes": 1234
},
"heartbeatMs": 2000
},
"pollMs": 3000
}Example
curl -X POST "https://www.bana.video/api/worker/claim" \
-H "Authorization: Bearer $WORKER_SECRET" \
-H "Content-Type: application/json"POST /api/worker/jobs/{id}/heartbeat
Say that an export is still being drawn, and how far it is.
- Endpoint id:
worker-heartbeat - Auth: Not for integrators. Only the program of a render machine calls it, proving itself with the secret of that machine (
Authorization: Bearer vw_…, shown once when an administrator added the machine). A secret that is not known is answered 401, and a machine an administrator switched off 403. An API token or a browser session does nothing here.
Called every heartbeatMs while the export is on the machine. A job that hears nothing for a minute is taken back from the machine. The answer says whether the user asked to stop the export: the machine stops drawing and gives it up with reason: "cancelled".
Request body (an example):
{
"attempt": 2,
"phase": "Drawing frames",
"progress": 0.4
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
attempt | integer | yes | Limits: 1–9007199254740991. |
phase | string | yes | Limits: 1–80 characters. |
progress | number | yes | Limits: 0–1. |
Responses
| Status | Meaning |
|---|---|
200 | { cancel }: true when the user asked to stop. |
400 | The body is not what the protocol says (a progress outside 0 to 1, say). |
409 | The export is not this machine's any more: it was taken back, cancelled or finished, or attempt is not the current one. Stop and forget it. |
Example of the 200 answer:
{
"cancel": false
}Example
curl -X POST "https://www.bana.video/api/worker/jobs/$JOB_ID/heartbeat" \
-H "Authorization: Bearer $WORKER_SECRET" \
-H "Content-Type: application/json" \
-d '{
"attempt": 2,
"phase": "Drawing frames",
"progress": 0.4
}'POST /api/worker/jobs/{id}/upload
Ask where to put the finished file.
- Endpoint id:
worker-upload - Auth: Not for integrators. Only the program of a render machine calls it, proving itself with the secret of that machine (
Authorization: Bearer vw_…, shown once when an administrator added the machine). A secret that is not known is answered 401, and a machine an administrator switched off 403. An API token or a browser session does nothing here.
Gives a signed address of the storage, valid for a while, and the headers its signature covers. The file is sent to it with a PUT, with its length (Content-Length) and exactly those headers; each attempt has a place of its own, so a file of an earlier machine is never mistaken for this one's. Ask again for a new address when a try fails. Up to 8 GB.
Request body (an example):
{
"attempt": 2,
"bytes": 18874368
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
attempt | integer | yes | Limits: 1–9007199254740991. |
bytes | integer | yes | Limits: up to 8589934592. |
Responses
| Status | Meaning |
|---|---|
200 | { url, headers }. |
400 | The body is not what the protocol says (no length, or one above the limit). |
409 | The export is not this machine's any more. |
Example of the 200 answer:
{
"url": "https://storage.example.com/…?signature=…",
"headers": {
"Content-Type": "video/mp4"
}
}Example
curl -X POST "https://www.bana.video/api/worker/jobs/$JOB_ID/upload" \
-H "Authorization: Bearer $WORKER_SECRET" \
-H "Content-Type: application/json" \
-d '{
"attempt": 2,
"bytes": 18874368
}'POST /api/worker/jobs/{id}/complete
Say that the file is in the storage.
- Endpoint id:
worker-complete - Auth: Not for integrators. Only the program of a render machine calls it, proving itself with the secret of that machine (
Authorization: Bearer vw_…, shown once when an administrator added the machine). A secret that is not known is answered 401, and a machine an administrator switched off 403. An API token or a browser session does nothing here.
The server looks for the file in the storage, in the length that was said, before it calls the export done and makes it available to its owner. It is safe to call again after a network error: a file that is complete answers the same.
Request body (an example):
{
"attempt": 2,
"bytes": 18874368
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
attempt | integer | yes | Limits: 1–9007199254740991. |
bytes | integer | yes | Limits: up to 8589934592. |
Responses
| Status | Meaning |
|---|---|
200 | { ok: true }: the export is done. |
400 | The body is not what the protocol says. |
409 | The export is not this machine's any more, or the file has not arrived, or is not as long as was said. |
Example
curl -X POST "https://www.bana.video/api/worker/jobs/$JOB_ID/complete" \
-H "Authorization: Bearer $WORKER_SECRET" \
-H "Content-Type: application/json" \
-d '{
"attempt": 2,
"bytes": 18874368
}'POST /api/worker/jobs/{id}/fail
Give an export up.
- Endpoint id:
worker-fail - Auth: Not for integrators. Only the program of a render machine calls it, proving itself with the secret of that machine (
Authorization: Bearer vw_…, shown once when an administrator added the machine). A secret that is not known is answered 401, and a machine an administrator switched off 403. An API token or a browser session does nothing here.
reason is failed (the video could not be drawn: the export fails with message), cancelled (the user asked to stop it) or unfit (this machine cannot draw it, say a browser that would not start, before anything was drawn: the export goes back to the board for another machine, and fails with the message when it was already taken 4 times). A call about an export that is not the machine's is answered 200 and does nothing.
Request body (an example):
{
"attempt": 2,
"reason": "failed",
"message": "The browser stopped answering."
}Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
attempt | integer | yes | Limits: 1–9007199254740991. |
reason | enum | yes | Allowed: failed, cancelled, unfit. |
message | string | no | Limits: up to 2000 characters. |
Responses
| Status | Meaning |
|---|---|
200 | { ok: true }. |
400 | The body is not what the protocol says (an unknown reason, a message over 2000 characters). |
Example
curl -X POST "https://www.bana.video/api/worker/jobs/$JOB_ID/fail" \
-H "Authorization: Bearer $WORKER_SECRET" \
-H "Content-Type: application/json" \
-d '{
"attempt": 2,
"reason": "failed",
"message": "The browser stopped answering."
}'Not in the guide: Drawing an export in the browser (what the export page calls)
Not for integrators. An export asked for from the dashboard with drawIn: "browser" can be drawn by the browser of the user who asked, on their own computer: the export page opens the page that draws the video in a hidden frame, draws it, and puts what it drew in the storage at an address the server signed (the pictures never pass through the server), and the server makes the video file from them. The server keeps the export for that browser for 8 seconds once it is ready to be drawn, then offers it to render machines, and draws it itself when none takes it, so an export is never stuck for lack of a browser. The browser asks every 1.5 seconds until it is its turn, and reports every 2 seconds while it draws. These calls are for a signed-in browser session only (an API token is answered 403), and only for the user's own exports. They work as a machine's calls do: an export is held by one executor at a time, claim marks it as the browser's, and every later call carries the attempt it was given; the calls of one that has lost the export (it was taken back, cancelled or finished) are answered 409 conflict: the browser stops and forgets it. A browser that cannot draw it (an old one, a tab that is hidden) gives it up with unfit and it goes on to the machines or the server.
POST /api/jobs/{id}/browser/claim
Ask for the export to draw it in this browser.
- Endpoint id:
browser-claim - Auth: Only a person signed in with a browser session on this site, from this site's own pages. A token never opens it, whatever the account: it is answered 403
forbidden, because what these endpoints do cannot be undone.
Without a body. Gives the export to this browser when it is the user's own, was asked for with drawIn: "browser", is on the board and nobody holds it, and marks it as the browser's: no machine and no server takes it while the browser holds it. order is what a machine's claim gives (jobId, attempt, videoId, options, duration, renderPath, progressFrom, audio, heartbeatMs). order is null with over: false while the export is not on the board yet (its voice is being recorded: ask again soon) or another tab of the user was quicker, and with over: true when there is no need to ask again: it ended, was stopped, is not for a browser, is on a machine, is being drawn by the server, or this browser gave it up.
Responses
| Status | Meaning |
|---|---|
200 | { order, over }. |
401 | Not signed in. |
403 | Called with an API token, or from another site. |
Example of the 200 answer:
{
"order": {
"jobId": "a1b2c3d4e5f60718",
"attempt": 2,
"videoId": "0123456789abcdef",
"options": {
"format": "mp4",
"resolution": "720p"
},
"duration": 31.5,
"renderPath": "/render/0123456789abcdef?job=a1b2c3d4e5f60718&token=…",
"progressFrom": 0.1,
"audio": {
"url": "https://storage.example.com/…?signature=…",
"name": "soundtrack.wav",
"bytes": 1234
},
"heartbeatMs": 2000
},
"over": false
}Example
# Signed-in browser session only, from the dashboard's pages; a token is answered 403.POST /api/jobs/{id}/browser/heartbeat
Say that the export is still being drawn, and how far it is.
- Endpoint id:
browser-heartbeat - Auth: Only a person signed in with a browser session on this site, from this site's own pages. A token never opens it, whatever the account: it is answered 403
forbidden, because what these endpoints do cannot be undone.
As a machine's heartbeat: called every heartbeatMs while the browser draws. An export that hears nothing for a minute is taken back from the browser and goes to a machine or the server. The answer says whether the user asked to stop the export: the browser stops drawing and gives it up with reason: "cancelled".
Request body (an example):
{
"attempt": 2,
"phase": "Drawing frames in your browser",
"progress": 0.4
}Responses
| Status | Meaning |
|---|---|
200 | { cancel }: true when the user asked to stop. |
400 | The body is not what the protocol says (a progress outside 0 to 1, say). |
409 | The export is not this browser's any more. Stop and forget it. |
Example of the 200 answer:
{
"cancel": false
}Example
# Signed-in browser session only, from the dashboard's pages; a token is answered 403.POST /api/jobs/{id}/browser/upload
Ask where to put what was drawn.
- Endpoint id:
browser-upload - Auth: Only a person signed in with a browser session on this site, from this site's own pages. A token never opens it, whatever the account: it is answered 403
forbidden, because what these endpoints do cannot be undone.
Gives a signed address of the storage, valid for a while, and the headers its signature covers. What the browser drew (the pictures of the whole video, as H.264) is sent to it with a PUT, with its length and exactly those headers. Each attempt has a place of its own. Up to 8 GB.
Request body (an example):
{
"attempt": 2,
"bytes": 4718592
}Responses
| Status | Meaning |
|---|---|
200 | { url, headers }. |
400 | The body is not what the protocol says (no length, or one above the limit). |
409 | The export is not this browser's any more. |
Example of the 200 answer:
{
"url": "https://storage.example.com/…?signature=…",
"headers": {
"Content-Type": "application/octet-stream"
}
}Example
# Signed-in browser session only, from the dashboard's pages; a token is answered 403.POST /api/jobs/{id}/browser/complete
Say that what was drawn is in the storage.
- Endpoint id:
browser-complete - Auth: Only a person signed in with a browser session on this site, from this site's own pages. A token never opens it, whatever the account: it is answered 403
forbidden, because what these endpoints do cannot be undone.
The server looks for it in the storage, in the length that was said, then makes the video file from it (with the narration) and calls the export done. That takes a few seconds for a short video. If what the browser drew cannot be made into a video, the export goes back to the board for a machine or the server (answer 422).
Request body (an example):
{
"attempt": 2,
"bytes": 4718592
}Responses
| Status | Meaning |
|---|---|
200 | { ok: true }: the export is done. |
400 | The body is not what the protocol says. |
409 | The export is not this browser's any more, or what was drawn has not arrived, or is not as long as was said. |
422 | What was drawn could not be made into a video. The export went back to the board. |
Example
# Signed-in browser session only, from the dashboard's pages; a token is answered 403.POST /api/jobs/{id}/browser/fail
Give the export up.
- Endpoint id:
browser-fail - Auth: Only a person signed in with a browser session on this site, from this site's own pages. A token never opens it, whatever the account: it is answered 403
forbidden, because what these endpoints do cannot be undone.
reason is failed (the video could not be drawn: the export fails with message), cancelled (the user asked to stop it) or unfit (this browser cannot draw it, or stopped halfway: the export goes back to the board for a machine or the server, and is not offered to this browser again; it fails with the message when it was already taken 4 times). A call about an export that is not the browser's is answered 200 and does nothing.
Request body (an example):
{
"attempt": 2,
"reason": "unfit",
"message": "This browser cannot draw pages into a canvas."
}Responses
| Status | Meaning |
|---|---|
200 | { ok: true }. |
400 | The body is not what the protocol says (an unknown reason, a message over 2000 characters). |
Example
# Signed-in browser session only, from the dashboard's pages; a token is answered 403.Complete examples
Make a vertical 1080p MP4 from a document, wait for it and save it. The scripts poll the job every two seconds. Run any of them with API_TOKEN set, and the video file is saved next to it.
curl + jq
#!/usr/bin/env bash
# Needs curl and jq.
set -euo pipefail
BASE=https://www.bana.video
JOB=$(curl -sf -X POST "$BASE/api/render" -H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" --data-binary @- <<'JSON' | jq -r .job.id
{
"spec": {
"title": "Why the sky is blue",
"domain": "science",
"scenes": [
{
"kind": "intro",
"say": [
"Why is the sky blue?",
"The answer is hiding in sunlight."
]
},
{
"kind": "statement",
"text": "Sunlight is made of **every colour** at once.",
"say": "Sunlight is made of every colour at once."
},
{
"kind": "statement",
"text": "Blue light scatters the **most**, so blue is the colour we see.",
"say": "Blue light scatters the most, so blue is the colour we see."
}
]
},
"options": {
"format": "mp4",
"aspect": "9:16",
"resolution": "1080p"
}
}
JSON
)
while true; do
STATUS=$(curl -sf "$BASE/api/jobs/$JOB" -H "Authorization: Bearer $API_TOKEN")
echo "$(echo "$STATUS" | jq -r '.job.phase') $(echo "$STATUS" | jq -r '(.job.progress * 100 | floor)')%"
case "$(echo "$STATUS" | jq -r .job.status)" in
done) break ;;
failed|cancelled) echo "$STATUS" | jq -r .job.error; exit 1 ;;
esac
sleep 2
done
curl -sf -OJL "$BASE/api/jobs/$JOB/download" -H "Authorization: Bearer $API_TOKEN"Node.js
// Node 18+ (global fetch). Save as render.mjs and run: node render.mjs
import { writeFile } from "node:fs/promises";
const BASE = "https://www.bana.video";
const headers = {
"Content-Type": "application/json",
Authorization: `Bearer ${process.env.API_TOKEN}`,
};
const spec = {
"title": "Why the sky is blue",
"domain": "science",
"scenes": [
{
"kind": "intro",
"say": [
"Why is the sky blue?",
"The answer is hiding in sunlight."
]
},
{
"kind": "statement",
"text": "Sunlight is made of **every colour** at once.",
"say": "Sunlight is made of every colour at once."
},
{
"kind": "statement",
"text": "Blue light scatters the **most**, so blue is the colour we see.",
"say": "Blue light scatters the most, so blue is the colour we see."
}
]
};
const started = await fetch(`${BASE}/api/render`, {
method: "POST",
headers,
body: JSON.stringify({ spec, options: { "format": "mp4", "aspect": "9:16", "resolution": "1080p" } }),
});
if (!started.ok) throw new Error(JSON.stringify(await started.json(), null, 2));
const { job } = await started.json();
let current = job;
while (!["done", "failed", "cancelled"].includes(current.status)) {
await new Promise((resolve) => setTimeout(resolve, 2000));
current = (await (await fetch(`${BASE}/api/jobs/${job.id}`, { headers })).json()).job;
console.log(`${current.phase} ${Math.round(current.progress * 100)}%`);
}
if (current.status !== "done") throw new Error(current.error ?? current.status);
const file = await fetch(`${BASE}/api/jobs/${job.id}/download`, { headers });
await writeFile(current.file.name, Buffer.from(await file.arrayBuffer()));
console.log(`Saved ${current.file.name} (${current.file.bytes} bytes)`);Python
# pip install requests
import os
import time
import requests
BASE = "https://www.bana.video"
HEADERS = {"Authorization": f"Bearer {os.environ['API_TOKEN']}"}
spec = {
"title": "Why the sky is blue",
"domain": "science",
"scenes": [
{
"kind": "intro",
"say": [
"Why is the sky blue?",
"The answer is hiding in sunlight."
]
},
{
"kind": "statement",
"text": "Sunlight is made of **every colour** at once.",
"say": "Sunlight is made of every colour at once."
},
{
"kind": "statement",
"text": "Blue light scatters the **most**, so blue is the colour we see.",
"say": "Blue light scatters the most, so blue is the colour we see."
}
]
}
started = requests.post(f"{BASE}/api/render", headers=HEADERS, json={"spec": spec, "options": { "format": "mp4", "aspect": "9:16", "resolution": "1080p" }})
started.raise_for_status()
job = started.json()["job"]
while job["status"] not in ("done", "failed", "cancelled"):
time.sleep(2)
job = requests.get(f"{BASE}/api/jobs/{job['id']}", headers=HEADERS).json()["job"]
print(f"{job['phase']} {round(job['progress'] * 100)}%")
if job["status"] != "done":
raise SystemExit(job["error"] or job["status"])
with requests.get(f"{BASE}/api/jobs/{job['id']}/download", headers=HEADERS, stream=True) as response:
response.raise_for_status()
with open(job["file"]["name"], "wb") as out:
for chunk in response.iter_content(chunk_size=1 << 20):
out.write(chunk)
print("Saved", job["file"]["name"])See also
- HTTP API guide: the page this skill is generated from.
- JSON format and scene reference: the video document that
specholds (thevideobana-video-jsonandvideobana-scenesskills). https://www.bana.video/api/schema(JSON Schema of the document) andhttps://www.bana.video/api/catalog(scenes, palettes, fonts, voices and every option, as data): both public.- Web component: play a public video on any page with
<video-player src="https://www.bana.video/api/public/videos/<id>">(thevideobana-web-componentskill).