Documentation
Guides and API reference for uploads, image transforms and video.
npm install @cd2/fileboy-react API https://api.fileboy.io
Documentation menu
Auto title, summary and chapters
A recording that is ready to share without writing anything: OpenAI reads the video's captions and writes a title, a short summary and chapters. It never replaces what you wrote yourself.
402 ai_addon_required and automatic runs are skipped; anything already made stays. Cost in AI credits: titles, summaries and chapters: 10 credits per million tokens sent, 50 per million written (about 0.2 credits for a 30 minute video). See the AI add-on.What it does
It reads one of the video's caption tracks: its auto-generated captions while it has them, otherwise one you uploaded or wrote (machine-translated tracks come last), or the one you choose. In one call to OpenAI it sends the cues' words with an id and start time each, and the video's length, and gets back:
- a title, at most 100 characters, and a summary of two to four sentences, written in the captions' language;
- chapters: where each main topic starts and a short title for it.
The chapters are checked before they are used:
- videos shorter than two minutes get none (the model isn't asked);
- each start moves to the nearest cue start, and the first starts at 0:00;
- they are in order and inside the video, and each runs at least 20 seconds (one too close to the one before is dropped, as is a last one too close to the end);
- there are at least 3 and at most 15 (fewer for a short video). With more, the shortest are merged into the one before; with fewer than 3 there are none, and the summary says why.
Long captions aren't cut off at one point, because the chapters need the whole video. Above about 60,000 characters (counting each cue's time as well as its words) the cues are grouped into up to 400 equal stretches of the video, each keeping its first cue's start and only the first words of the stretch that fit its share. One call still covers every part of the video evenly, but in a very long video most of each stretch's words are left out.
It never overwrites yours
What is written is put on the video only where it replaces nothing of yours:
- the title becomes the video's name only while the video still has its default name (the uploaded file's name, with or without its extension) or the title an earlier run gave it;
- the summary becomes its description only while the description is empty or still the one an earlier run wrote;
- the chapters replace the video's chapters only while it has none, or only the chapters an earlier run made, unchanged.
Anything else is kept as a suggestion (state suggested), and the dashboard shows it with an Accept button. POST /videos/:id/summary/accept with parts (title, summary, chapters) does the same from your server. Only suggestions are accepted: a part already on the video stays as it is, even after you changed it. Send summarizedAt from the summary you showed, and a result written again since is refused (409 summary_changed).
What was put on the video counts as auto-generated until you change it: autoGenerated is true while the name, description or chapters are still exactly what was written, and GET /videos/:id/chapters marks each chapter it made with autoGenerated: true (the chapter editor labels them Auto). Edit one chapter and that one is yours: the next run keeps your list and suggests its own.
Generate it
In the dashboard, open the video's Captions & AI tab and use AI summary: choose the title and summary, the chapters or both, and press Generate (Regenerate after the first time). It takes a few seconds. From your server, with the private key (or a scoped key with videos:write to generate and accept, and videos:read to look):
// a title, summary and chapters from the video's captions, by OpenAI (private key, or videos:write)
const queued = await fileboy.summarizeVideo(video.id) // or { transcriptId, parts: ["chapters"] }
queued.status // "pending"; video.summarized is sent when it is done
const s = await fileboy.getVideoSummary(video.id)
s.title // { text, state: "applied" or "suggested", autoGenerated }
s.chapters?.chapters // [{ title, startTime }]
// your own title, description or chapters are never replaced: accept a suggestion to use it
await fileboy.acceptVideoSummary(video.id, ["chapters"])fileboy.summarize_video(video.id) # or transcript_id:, parts: ["chapters"]
s = fileboy.fetch_video_summary(video.id)
s.title.text # with s.title.state: "applied" or "suggested"
s.chapters.chapters.first.title
fileboy.accept_video_summary(video.id, ["chapters"])client.summarize_video(video.id) # or transcript_id=, parts=["chapters"]
s = client.get_video_summary(video.id)
s.title.text # with s.title.state: "applied" or "suggested"
s.chapters.chapters[0].title
client.accept_video_summary(video.id, ["chapters"])$fileboy->summarizeVideo($video->id); // or $trackId, ['chapters']
$s = $fileboy->getVideoSummary($video->id);
echo $s->title?->text; // with $s->title->state: applied or suggested
echo $s->chapters?->chapters[0]->title;
$fileboy->acceptVideoSummary($video->id, ['chapters']);curl -X POST https://api.fileboy.io/videos/VIDEO_ID/summarize \
-H "Authorization: token YOUR_SIGNED_TOKEN" \
-H "Content-Type: application/json" \
-d '{"parts": ["summary", "chapters"]}'
# what was made, and whether each part is on the video or a suggestion
curl https://api.fileboy.io/videos/VIDEO_ID/summary \
-H "Authorization: token YOUR_SIGNED_TOKEN"
# put suggestions on the video
curl -X POST https://api.fileboy.io/videos/VIDEO_ID/summary/accept \
-H "Authorization: token YOUR_SIGNED_TOKEN" \
-H "Content-Type: application/json" \
-d '{"parts": ["title", "chapters"]}'1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36{ "data": { "videoId": "9b1c4d1e-5c1e-4b8e-9d57-3f0a4f1a7c10", "status": "done", "message": null, "reason": "request", "settings": { "autoSummary": null, "autoChapters": null, "summary": false, "chapters": false }, "available": true, "parts": ["summary", "chapters"], "sourceTrackId": "5e0c7a12-3d4b-4f6a-9e21-8c7b6a5d4e3f", "stale": false, "language": "en", "title": { "text": "Setting up the project and shipping it", "state": "applied", "autoGenerated": true }, "summary": { "text": "A walk through setting up the project, building it and shipping it. It ends with a short demo.", "state": "suggested", "autoGenerated": false }, "chapters": { "chapters": [ { "title": "Introduction", "startTime": 0 }, { "title": "Setting up", "startTime": 42.5 }, { "title": "Building it", "startTime": 131 }, { "title": "Shipping and a demo", "startTime": 248 } ], "state": "applied", "autoGenerated": true }, "chaptersMessage": null, "model": "gpt-6-luna", "segments": 96, "characters": 5210, "queuedAt": "2026-11-18T04:00:00Z", "summarizedAt": "2026-11-18T04:00:09Z" } }
POST /videos/:id/summarize takes parts (summary for the title and summary, chapters; both when left out) and transcriptId (the caption track to read; the best one when left out), and answers 202 with the summary, pending. status then becomes processing and done, failed or skipped (the captions have no words, or were deleted); message says why. A video with no captions answers 422 no_captions.
Make them automatically
It is off by default. In the app's Settings, under Auto title, summary and chapters, turn on the title and summary, the chapters, or both (autoSummary and autoChapters in the app settings). Each video can follow the app or set its own, on its Captions & AI tab or with PATCH /videos/:id/summary (the app's private key only, since it agrees to send the video's captions to OpenAI). While it is on, they are written when a video's auto-generated captions are made, and when a caption track is added to a video that has no summary yet (or whose last run failed or was skipped). An automatic run never fills a description or chapters you cleared after an earlier run wrote them: those come back as suggestions.
A track uploaded with the public key never starts a run by itself, since anyone with your public key could upload captions that steer what is written. Upload with the private key, or after a public-key upload call POST /videos/:id/summarize with { "auto": true } from your server: it starts the run only as the settings say. The dashboard does this for you.
# write a title, summary and chapters whenever a video gets captions
curl -X PATCH https://api.fileboy.io/app/settings \
-H "Authorization: token YOUR_SIGNED_TOKEN" \
-H "Content-Type: application/json" \
-d '{"autoSummary": true, "autoChapters": true}'
# one video its own way: true, false, or null to follow the app
curl -X PATCH https://api.fileboy.io/videos/VIDEO_ID/summary \
-H "Authorization: token YOUR_SIGNED_TOKEN" \
-H "Content-Type: application/json" \
-d '{"autoChapters": false}'Where the text goes
Fileboy uses OpenAI as the processor. Only when you generate, or have it on, the caption track's words and cue start times are sent to OpenAI's API. The video and its sound are not sent. Requests ask OpenAI not to store them, and the captions are treated as content to summarise, never as instructions.
What is public: once the title and summary are the video's name and description, they follow the video's visibility like any name and description (the watch page, its preview card and oEmbed show them). Chapters are public with the video, as chapters always are. Suggestions, settings and usage are only in the management API.
When the captions change
When the caption track it read changes, the summary says so: stale: true in the API and an Out of date warning in the dashboard. That is when you edit the track, or when auto-generated captions are made again (for example after the video's source is replaced). Nothing is rewritten until you press Regenerate, which is your call because it sends the captions to OpenAI again. The exception: when the video has it on, new auto-generated captions write it again straight away, with the same rules, so only what is still auto-generated is replaced.
A trim, cut or trim reset moves the chapters it made, and the ones it suggests, with the video's other chapters, so they stay in place and still count as auto-generated. The captions move too, so nothing goes stale.
The webhook
video.summarized is sent when a run finishes. Video filters apply and it can be replayed, like the other video events. Each *State is applied or suggested, and left out for what wasn't made; chapters is how many were made. A failure sends no webhook; its message is on the summary.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22{ "type": "video.summarized", "resource": { "id": "9b1c4d1e-5c1e-4b8e-9d57-3f0a4f1a7c10", "name": "Setting up the project and shipping it", "status": "ready", "summary": { "status": "done", "reason": "request", "sourceTrackId": "5e0c7a12-3d4b-4f6a-9e21-8c7b6a5d4e3f", "language": "en", "title": "Setting up the project and shipping it", "titleState": "applied", "summary": "A walk through setting up the project, building it and shipping it. It ends with a short demo.", "summaryState": "suggested", "chapters": 4, "chaptersState": "applied", "model": "gpt-6-luna", "summaryUrl": "https://api.fileboy.io/videos/9b1c4d1e-5c1e-4b8e-9d57-3f0a4f1a7c10/summary" } } }
Limits and failures
- An app can ask for 60 runs an hour, and the processor starts up to 30 runs per app in each clock hour, counting every run (a retry, or the same video again). The rest wait their turn. While a video is being trimmed, cut or blurred, its run waits for that to finish, and nothing is sent.
- These limits are per app and count every start on all of Fileboy's servers together, retries included. They reset at the top of each UTC hour, and come from your plan, which can also set a monthly cap (none do today). Jobs over a limit stay
pendinguntil the next hour or month; documents and questions answer429 rate_limited. See each feature's use this hour and month in the app's Usage page (AI usage and limits) or withGET /usage/ai. - If OpenAI is busy or has an error, a run is tried again after 1, 5 and 30 minutes, then marked
failed. An answer that isn't the JSON asked for is asked for again twice, then fails straight away so no more is spent on it. One cut short (too long, or filtered) fails at once. The message is always Fileboy's own: OpenAI's error text is only in the server's logs. - Fileboy counts each app's runs, characters and tokens:
GET /usage/summary, and the last 30 days on the settings card.