---
title: "Plan a video's stock B-roll"
method: POST
path: "/v1/stock/broll-plan"
tags: ["Stock"]
---

# Plan a video's stock B-roll

`POST /v1/stock/broll-plan`

## Request

- Base URL: `https://apihub.co.il`
- URL: `https://apihub.co.il/v1/stock/broll-plan`
- Auth: HTTP bearer

Finds the stock shots for a whole video and returns them ready for POST /v1/studio/edit — the cheap alternative to generated B-roll (a 4-second Veo 3.1 Fast clip costs ≈ 100× more). `style: "cutaways"`: 2–4 shots cut in over a talking head where a line names something a camera can show (a portrait shot full frame, a landscape one as a split screen with the face kept); `style: "faceless"`: stock clips and photos over the whole video while the voice goes on, a new shot every ~2.4 s. Gemini Flash-Lite reads the words (`words` of POST /v1/studio/kinetic, or a `transcript_id` on the output clock) and writes an English search per moment — or send your own `moments`. Every candidate is scored on its shape against the frame, its pixels against the crop, a clip's length against its slot, the search words in its title and tags and its source's own rank; the best few are shown to Gemini Flash-Lite as thumbnails (`verify`), and each chosen file is copied to our storage (24 h). Sources follow APIhub's licence rule for automatic insertion: by default only CC0 — photos and video on Wikimedia Commons marked CC0 and Openverse CC0 — and a shot is used only with its licence record (source, the file at the source, its page, the licence URL), which comes back with it; where the server's rule allows more, Pexels and Pixabay video and photos too (when the server has their keys), and with `attribution: "any"` credited shots with their credit line on screen. Rules on people: a line about something bad (a scam, failure, loss, fear) is never illustrated with a recognisable person, and with `context: "ad"` no stock person or brand appears at all (nobody in the footage may seem to endorse the product; CC0 settles copyright, not a person's likeness or a trademark) — with the thumbnail check on, only shots the check saw without a face or a logo go in. Send `edit` (e.g. the kinetic plan's `output.edit`) and it comes back with the shots merged in. Pexels and Pixabay footage is used only inside the edit (it is not a library to download): the answer carries `provided_by` — "Photos and videos provided by Pexels" with its link, to show where you publish the video's credits — and each shot's photographer credit. Photos and videos provided by Pexels (https://www.pexels.com). Recipes: /skills/full-stock-broll.md, /skills/full-stock-faceless.md

**Billing:** Searches + one or two Gemini Flash-Lite calls at their real cost · **Rate limit:** 20/min

## Headers

- `Idempotency-Key` string
- `X-Tag` string

## Request body

- object
  - `edit` object: A POST /v1/studio/edit body (e.g. `output.edit` of POST /v1/studio/kinetic): the shots are merged into it and it comes back ready
  - `kind` 'any' | 'video' | 'image': any = video first, a photo where no clip fits
  - `mode` 'auto' | 'full' | 'split': cutaways: auto = portrait shots full frame, landscape ones as a split screen
  - `avoid` object[]: cutaways: spans (seconds) to keep free; the edit's hook, title cards and stickers are kept free anyway
    - `end` number, required
    - `start` number, required
  - `cache` boolean: Copy each chosen file to our storage (24 h) — a render never depends on another host, and Pixabay's terms require it
  - `count` integer: cutaways: how many shots
  - `scrim` boolean: A light dark band behind the words over the footage (cutaways: the shot's half; faceless: the word band) so small words read on busy pictures
  - `style` 'cutaways' | 'faceless': cutaways = 2–4 stock shots over a talking head · faceless = stock footage and photos over the whole video (the voice goes on)
  - `topic` string: One line on what the video is about
  - `voice` object: faceless over a narration: the voice-over file and its length — mixed in as `voiceover`, the render trimmed to it
    - `url` string, uri, required
    - `seconds` number, required
  - `words` object[]: The spoken words on the OUTPUT clock, in SECONDS — `output.words` of POST /v1/studio/kinetic as is
    - `i` integer
    - `end` number, required
    - `text` string, required
    - `start` number, required
  - `sounds` object: A whoosh file: reused 0.25 s before every cutaway (faceless: on every scene change, as room allows)
    - `whoosh` string, uri
  - `verify` boolean: Show the best candidates' thumbnails to Gemini Flash-Lite before choosing (≈ $0.001–0.005)
  - `context` 'general' | 'ad': ad = an advert or a sales video: no stock person (and no brand) is shown, so nobody in the footage seems to endorse the product — with `verify`, every chosen shot's thumbnail was checked for a face or a logo
  - `exclude` string[]: Stock ids not to use (e.g. from an earlier plan)
  - `moments` object[]: Your own moments and searches — then no model picks them (cutaways: each is one shot; faceless: each starts a scene that runs to the next)
    - `alt` string: A second search if the first finds nothing good
    - `mode` 'auto' | 'full' | 'split'
    - `must` string: cutaways: a word the picture's title or description must name — the thing itself ("elephant"); a candidate without it is no candidate
    - `text` string: What is said there (helps the thumbnail check)
    - `query` string, required: English stock search, 2–5 words
    - `short` string: The core subject in 1–2 words ("laptop") — for sources that match exact words
    - `start` number, required: seconds, output clock
    - `duration` number
  - `seconds` number: cutaways: how long each shot stays
  - `duration` number: The output's length in seconds (the kinetic plan's `summary.output_seconds`); default: the last word + 1.5 s
  - `resolution` '720' | '1080': Default: the edit's output, else 1080
  - `split_side` 'top' | 'bottom': split: where the stock shot goes (bottom keeps the face on top, the words over the shot)
  - `attribution` 'not-required' | 'any': Only where the server's licence rule allows more than CC0 (setting stock_auto_license = cc0-and-free): not-required = CC0 / public domain / Pexels / Pixabay; any = CC BY too, with its credit line on screen while it shows (ShareAlike never). Under the default rule every shot is CC0.
  - `aspect_ratio` '9:16' | '16:9' | '1:1' | '4:5': Default: the edit's output, else 9:16
  - `shot_seconds` number: faceless: a new shot about this often
  - `speaker_focus` number: split: which band of the speaker stays (0 top … 1 bottom; a selfie face ≈ 0.35)
  - `transcript_id` string: Or a transcript whose clock is the output's (e.g. of the cut audio) — read here, its words in ms

## Response `200`

Completed

- object
  - `id` string: Execution id — stable across internal retries; use it with GET /v1/executions/{id}
  - `status` 'pending' | 'processing' | 'completed' | 'partial' | 'failed' | 'cancelled' | 'timeout'
  - `operation` string
  - `tag` string, nullable: Your X-Tag, if sent
  - `created_at` string, date-time
  - `completed_at` string, date-time, nullable
  - `output` object: Operation result (see each operation). While a Studio render is processing: `stage` (queued · transcribing · downloading · preparing · cleaning_voice · mixing_audio · rendering · finishing), `phase` (the engine's: download · prepare · voice · audio · encode · qa · upload, or null), `progress` (a percent, 0–100) and `progress_fraction` (0–1), `eta_seconds` (seconds left, never below 0) and `estimate_seconds`
  - `error` string, nullable
  - `usage` object
    - `credits_charged` number, nullable
    - `credits_reserved` number
    - `estimated_credits` number
    - `cost_source` 'provider_reported' | 'calculated' | 'estimated' | 'null', nullable
    - `provider_usage` object, nullable: Normalised consumption, e.g. { VIDEO_SECOND: 22.4 }
  - `balance` object
    - `available` number
    - `reserved` number

## Other responses

- `400`: Invalid input
- `402`: Insufficient credits / project budget
- `404`: Resource not found (or not yours)
- `429`: Rate limited
- `503`: Service temporarily paused

---

[API](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai.md) · [All operations](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/apihub/apis/apihub-one-api-for-chat-image-video-ai/revisions/a8caa42835ce?raw)
