# Skill: Stock B-roll

> Newer: [/skills/full-stock-broll.md](/skills/full-stock-broll.md) — the moments, the search, a thumbnail check and the
> copy in ONE call (`POST /v1/stock/broll-plan`), stock VIDEO from Pexels / Pixabay, and the kinetic edit around it.

Give a talking-head clip real pictures. The transcript decides where a picture helps, the stock search
finds it, and it cuts in for 2–3 seconds — full frame when the sentence is about the thing itself, split
screen when the speaker should stay visible.

**Price:** 120–135 credits per finished minute · 30 seconds ≈ 62–72 credits
**Uses:** `/v1/stock/search` · `/v1/stock/save` · `/v1/studio/remove-silence` · `/v1/studio/edit` — nothing is generated by a model.

Base URL: `https://apihub.co.il` · Auth: `Authorization: Bearer <key>` · Docs: `/docs`
Put the same `X-Tag: <job>` on every call; `GET /v1/usage?tag=<job>` then prints the bill.

---

## 1. Cut and transcribe

```jsonc
POST /v1/studio/remove-silence
{ "video_url": "<source>", "language_code": "he", "min_pause_ms": 400, "padding_ms": 80,
  "remove_fillers": true, "output": { "resolution": "source", "aspect_ratio": "original", "quality": "high" } }

POST /v1/speech/transcripts   { "audio_url": "<cut url>", "language_code": "he" }
GET  /v1/speech/transcripts/{id}/sentences
```

Everything after this is on the **cut** clock.

## 2. Pick the moments

Read the sentences and choose 4–6 where a picture adds something a face cannot: a place, an object, a
person, a document, a machine, a number on a chart. Skip sentences that are opinion or transition — a
picture there only hides the speaker. Keep 5+ seconds between pictures and none in the last 3 seconds.

For each moment write an **English** search query of 2–4 words (sources are indexed in English), even when
the video is Hebrew.

## 3. Find the pictures

```
GET /v1/stock/search?q=solar%20panels%20roof&kind=image&limit=6&orientation=portrait&attribution=not-required
```

- `orientation=portrait` for 9:16, `landscape` for 16:9 — a wrong-shaped photo gets cropped hard.
- Prefer results at least 1200 px on the short side.
- Then `POST /v1/stock/save { "url": "<the url>" }` and use the returned URL in the render. It costs
  nothing, and it means a slow or blocking host cannot fail your render.

## 4. Render

```jsonc
POST /v1/studio/edit     // x-wait-ms: 110000
{
  "video_url": "<cut url>",
  "transcript_id": "<from step 1>",
  "captions": { "style": { "preset": "classic", "font": "Heebo", "weight": 900, "size": 7,
    "color": "#FFFFFF", "active_color": "#FFE600", "outline": 11, "shadow": 3,
    "animation": "pop", "max_words": 3, "max_lines": 1,
    "position": "bottom", "margin": 18, "side_margin": 7 } },
  "hook": { "text": "<5–8 words from the content>", "duration": 3.2,
    "style": { "preset": "yellow", "font": "Rubik", "weight": 900, "size": 6.2, "margin": 10 } },
  "overlays": [
    { "url": "<saved url>", "type": "image", "start": 6.2, "duration": 2.6, "mode": "full", "fade_ms": 180 },
    { "url": "<saved url>", "type": "image", "start": 14.0, "duration": 2.6, "mode": "split",
      "split_side": "top", "split_ratio": 0.55, "speaker_focus": 0.3, "fade_ms": 180 }
  ],
  "zoom": [ { "start": 20.0, "end": 22.0, "to": 1.12, "ease": "smooth", "y": 0.35 } ],
  "audio": { "normalize": true },
  "output": { "aspect_ratio": "9:16", "resolution": "1080", "fit": "crop", "quality": "high" }
}
```

**Rules of thumb**

- `mode: "full"` for 2–3 s only; longer and the viewer forgets who is talking.
- `mode: "split"` (visual on top, speaker re-framed below) when the speaker's reaction matters.
- A still picture is dead on screen: give at least one of them a `zoom` over the same seconds.
- Never put a picture over the punchline.

## Licences — read this before you ship

`GET /v1/stock/search` returns, for every result: `license`, `attribution_required` and a ready
`attribution` line. Two ways to stay clean:

- **Easiest:** add `&attribution=not-required`. You then get only CC0 / public-domain / Pexels / Pixabay
  results, and nothing has to appear on screen.
- **Otherwise:** when `attribution_required` is true, put the credit on screen while the picture is up —
  a `texts` element, preset `small`, `y: 92`, same `start` and `duration` as the overlay. Keep the
  `page_url` in your records.

Never use a result whose licence you did not check. Sources are filtered to commercial use, but "commercial"
and "no credit needed" are not the same thing.

**How to read the price.** Renders are billed per second of output, so cutting and captioning scale with
length. Everything that is *generated* — an image, a clip, a music track — is billed per asset, no matter how
long the video is. That is why half a minute is not half the price: a 30-second video with the same four
images and one music track costs nearly what a 60-second one costs. Real numbers, not estimates, come from
`GET /v1/usage?tag=<your tag>` after the job.
