# Skill: full/speech-dub — "נאום לריל בעברית — הדקה הכי חזקה, מדובבת עם רגש" (Complete video)

A long talk becomes a one-minute reel in Hebrew. Gemini watches the whole speech where it is on YouTube — nothing is downloaded — and picks its strongest continuous minute; the sentences are transcribed exactly with how each one is said, translated into spoken Hebrew written so a voice cannot misread it, and read line by line by ElevenLabs v3 with acting directions: calm in the story, a shout at the peak. Every word is checked by a transcript and the weak lines are re-recorded. Epic music under the voice, licensed stock footage over the whole video, kinetic words, black cards on the two strongest lines and the speaker credited on screen — the speech itself never appears. The example: Arnold Schwarzenegger's 45-minute "Rules of Success" → 81 seconds in Hebrew, in the owner's own cloned voice. For talks you may quote: your own, public-domain or Creative Commons speeches, or a short credited quote.

**Includes:** a long talk on YouTube, watched where it is — nothing downloaded · its strongest continuous minute, chosen from the whole speech · the exact sentences, with how each one is said · a spoken translation, written so a voice cannot misread it · every line voiced with acting directions — calm in the story, a shout at the peak · every word checked by a transcript, weak lines re-recorded · epic music under the voice · licensed stock footage over the whole video · kinetic words, black cards on the two strongest lines, the speaker credited
**Built on:** `POST /v1/ai/text` watching the YouTube link (no download), ElevenLabs v3 lines with direction tags joined in `voiceover` on the black canvas, the kinetic planner on the track's words and `POST /v1/stock/broll-plan` (faceless) for the picture, a `banner` title and a two-line credit
**Price:** 290–430 credits per finished minute · 30 s ≈ 180–270 credits
**Uses:** `/v1/ai/text` · `/v1/ai/voice` · `/v1/studio/edit` · `/v1/speech/transcripts` · `/v1/ai/music` · `/v1/studio/kinetic` · `/v1/stock/broll-plan`

Base URL: `https://apihub.co.il` · Auth: `Authorization: Bearer <API key>` · Docs: `/docs`
Send the same `X-Tag: <job name>` header on every call of one video; `GET /v1/usage?tag=<job name>` then
returns exactly what it cost. Times in request bodies are **seconds on the edited (output) timeline**.
Unknown fields are rejected with the name of the right field — read the error instead of guessing.
**Files are kept 24 hours** (renders, uploads, generated clips/images/music) — download the finished video.

**Models.** Gemini 3.1 Pro (`quality: "best"`) watches the whole talk at 0.2 fps, then the candidates at 1 fps, and
listens to the delivery; ElevenLabs v3 reads the lines and makes the music; AssemblyAI checks every word; Gemini Flash-Lite picks and
checks the stock (Pexels, Pixabay, CC0). The watch is priced by the talk's length, everything else by the reel's.

---

## 1. Watch the whole speech and pick its strongest minute

```jsonc
POST /v1/ai/text { "quality": "best", "json": true, "max_tokens": 24000,
  "prompt": "Watch this whole speech. Find the single most motivating CONTINUOUS stretch of about 55–75 seconds that works on its own as a reel: a strong opening line, rising energy, a peak, a punchy last line, no setup that needs earlier context, sentence boundaries at both ends. Also give 2 alternatives. JSON: { best: { start, end, why, first_line, last_line }, alternatives: […], speaker_notes }",
  "media": [ { "url": "https://www.youtube.com/watch?v=<id>", "type": "video", "start": 0, "fps": 0.2 } ] }
// a 45-minute speech ≈ 100,000 tokens ≈ 96 credits, ≈ 2 min · "start": 0 matters — a link with &t= starts there
```

**Nothing is downloaded.** Gemini watches the link where it is; the reel shows licensed stock footage, never the speech,
and names the speaker on screen. The words still belong to whoever owns the talk: your own talks, public-domain or
Creative Commons speeches, or a short credited quote.

**Low fps on purpose.** A speech is heard, not watched — 0.2 frames a second is enough to choose, and five times cheaper.



## 2. The exact sentences of the candidates

```jsonc
POST /v1/ai/text { "quality": "best", "json": true, "temperature": 0.1,
  "prompt": "Transcribe EVERY spoken sentence verbatim with its start and end in seconds of the FULL video (the clip starts at <start>). Mark laughter and applause as their own items. For each sentence add \"delivery\" (calm, joking, intense, shouting…). Rate the stretch 1–10 as a 60-second reel and say which sentence it should start and end on.",
  "media": [ { "url": "<the link>", "type": "video", "start": <best.start − 10>, "end": <best.end + 15>, "fps": 1 } ] }
// ≈ 30–40 credits a candidate · run the best and the strongest alternative side by side, then choose
```

The model's first pick is often the most *viral* minute, not the most *motivating* one. In the example it chose "sleep
faster" (a joke and the arithmetic of a day); the transcripts showed "don't listen to the naysayers" climbing from a story
to a shout. Read both and choose.

## 3. The translation — written for a voice

One line per sentence, each with `at` = where the speaker starts it. Your own pass, before any voice reads it:
- **Spoken, not translated.** "I'm gonna be the one" is «אני אהיה הראשון», not «אני אהיה האחד הזה»; "I am a strong
  believer what Mandela said" is «אני חי לפי משפט אחד… המשפט של נלסון מנדלה».
- **No em-dashes.** ElevenLabs v3 reads «—» as a dead stop; a comma keeps the flow. «אבל אני — הולך — לעשות את זה» came out
  robotic; «אבל אני הולך לעשות את זה!» is the peak.
- **Words the voice stresses wrong** go: «סביבי», «אתלטיקה» → «בריצה», «אוכיח» → «וכולם עוד יראו». Quotes in ״…״.
- **Applause** splits a sentence the speaker repeats ("Because I am a strong believer…" [applause] "I am a strong
  believer…"): keep both halves, the second picks up the thought.

## 4. One take per line, with direction

```jsonc
POST /v1/ai/voice { "text": "[intense] אל תקשיבו לאלה שאומרים לכם ״אי אפשר״.", "voice_id": "<voice>",
  "stability": 0, "language_code": "he" }        // ≈ 2–4 credits a line · → output.url, output.duration_seconds
```

- **The director does this for you on plain Hebrew** (`prepare`, on by default — tags, niqqud on every Hebrew word, stability
  from the words; say the delivery in `mood`). Write the tags yourself only when you want a specific one on a specific line; a
  text with tags or niqqud is read exactly as sent.
- **Direction tags** in English at the start: `[storytelling]` `[serious]` `[sarcastic]` `[intense]` `[excited]`
  `[passionate]` `[shouting]` `[firm]`. `stability`: 0 for the emotional lines (more acting), 0.5 for the narration.
- **The voice.** A voice from `GET /v1/ai/voices`, or your own: `POST /v1/ai/voices/clone` { "name", "audio_urls",
  "consent" } → a `voice_id` only your account can use (the example is the owner's own clone, made from ≈ 2 minutes of
  his WhatsApp videos; the default model, eleven_v4, is the newest and most emotive — never name an older one). A HeyGen clone (`POST /v1/voices` + `/v1/voices/speech`) is the speaker's timbre
  but reads flat — no direction tags.

## 5. The track

Back to back on the black canvas, the speaker's own pauses tightened: ≈ 0.35 s between lines, 0.6–0.9 s before a peak.

```jsonc
POST /v1/studio/edit { "video_url": "https://media.gpt.org.il/samples/canvas-9x16-black-15min.mp4", "trim": { "end": <last line end + 1.5> },
  "audio": { "mute": true, "normalize": true },
  "voiceover": [ { "url": "<line 1>", "start": 0.6 }, { "url": "<line 2>", "start": 4.65 }, … ], "output": { "format": "mp3" } }   // ≈ 0.2 credits a second (81 s: 16)
```

## 6. Check every word, then the delivery

```jsonc
POST /v1/speech/transcripts { "audio_url": "<track mp3>", "language_code": "he", "speech_models": ["universal-2"] }   // ≈ 2 credits
```

**The words:** read the transcript against your script, line by line — a misread word shows up as a different word.
**The delivery:** `POST /v1/ai/text` (`quality: "best"`) with the track as `media` ("a native dubbing director: per line the
emotion 1–10, robotic pauses, wording that sounds translated, the three weakest lines and how to direct them"). Never hand
it a list of words to look for — it reports those words as misread even when they are no longer in the script; it also
judges acting worse than an ear does. Re-record the weak lines (step 4, a new idempotency key), rebuild the track.

## 7. The music

```jsonc
POST /v1/ai/music { "prompt": "Epic cinematic motivational underscore, 85 BPM, a simple hopeful piano motif over warm strings, soft taiko pulses entering after 30 seconds, building to a triumphant climb in the last 20 seconds, ends on one big resolved hit, instrumental, no vocals, stays under a speaking voice.",
  "duration": <track seconds + 1>, "instrumental": true }       // ≈ 0.95 credits a second
```

## 8. The words and the stock

```jsonc
POST /v1/studio/kinetic { "video_url": "https://media.gpt.org.il/samples/canvas-9x16-black-15min.mp4", "words": <the track transcript's words (ms)>, "cut": false,
  "source": { "duration": <track seconds>, "fps": 30 },
  "emphasis": [ … ], "scenes": [ { "word": <the quote> }, { "word": <the peak> } ],
  "music": { "url": "<the music>", "volume": 0.16 } }       // 1 credit · the voice ends ≈ 16–19 dB over the bed
POST /v1/stock/broll-plan { "style": "faceless", "words": <kinetic output.words>, "duration": <summary.output_seconds>,
  "edit": <kinetic output.edit>, "voice": { "url": "<track mp3>", "seconds": <track seconds> }, "kind": "any", "verify": true,
  "moments": [ { "start": 0, "query": "man lifting heavy barbell", "short": "barbell" },
               { "start": 23.7, "query": "skier downhill snow mountains", "short": "skiing" }, … ] }   // ≈ 12 credits
```

One moment per sentence or two, an English search that shows what the line *means* (the parents saying no → an empty gym at
night; "I'll be the first" → a man running up city stairs). No night skies or dark rooms — a nearly black shot reads as a
hole in the video. Two black cards (`scenes`) on the strongest lines: the quote and the peak.

## 9. The title, the credit, one render

The kinetic plan uses most of the 80 `texts` — the title goes in as a graphic, the credit as one text with two lines:

```jsonc
"graphics": [ …, { "kind": "banner", "text": "<the speaker>", "sub": "״<the talk>״ בעברית", "y": 21, "background": "#0B0B14",
  "enter": "pop", "during": { "from": "w0001", "to": "w0010" } } ],
"texts": [ …, { "text": "נערך עם *apihub.co.il*\n<the speaker> · <the talk>", "preset": "pill", "effect": "box",
  "style": { "y": 92.5, "size": 3.4, "weight": 800, "background": "#0B0B14E6", "accent_color": "#D0F808" }, "during": { … the whole video } } ],
"output": { "aspect_ratio": "9:16", "resolution": "720", "quality": "high" }
POST /v1/studio/edit <the edit>          // ≈ 1 credit a second at 720p · x-wait-ms: 110000, then poll
```

**720p, not 1080p.** The stock is 720p, and 30+ shots in one 1080p render ran out of memory on the render server in the example.
When you publish, credit the footage: "Videos provided by Pexels".

## What the example cost

Arnold Schwarzenegger, "Rules of Success" (45 minutes) → 81 seconds in Hebrew (dev, 1.10.2026):

| Step | Credits |
|---|---|
| Watch the whole speech, pick the minute | 96 |
| The exact sentences of two candidates | 65 |
| 17 lines in the cloned voice + 10 re-recorded | 72 |
| The checks: two listening passes and the transcript | 56 |
| The music, 82 s | 77 |
| 34 stock shots (Pexels), chosen and checked | 12 |
| The words: kinetic plan, transcripts, uploads | 7 |
| Render, 720p | 77 |
| **Total** | **462** |

The example's track was joined on our side; through step 5 it adds ≈ 16. Without the second candidate, the listening
passes and the re-recorded lines it is ≈ 370. The watch follows the SOURCE's
length (≈ 2 credits a minute of it), the rest the reel's.

Send `x-wait-ms: 110000` to wait for the render in the same call; if the response is still
`processing`, poll `GET /v1/executions/{id}` until `status` is `completed` and read `output.url`.

## Check the bill

`GET /v1/usage?tag=<job name>` — per call, per operation and the total, in credits. Quote that to the
customer, not the estimate above.

## Rules that keep captions readable on every platform

- **Safe zone.** Keep text inside the middle 80% of the frame: `side_margin` ≥ 6 handles the sides; `margin`
  ≥ 12 keeps the bottom clear of the platform UI (username, buttons, progress bar).
- **A line never leaves the frame** — a line too wide for the side margins is set smaller automatically. Do
  not shrink the size yourself, wrap instead (`max_chars_per_line`).
- **Hebrew has no capitals** — keep `uppercase: false`; it only breaks Latin words mixed into a sentence.
- **Fonts.** `GET /v1/studio/fonts` lists the bundled families and which scripts they draw. A font that
  cannot draw the caption's language is swapped and reported in `warnings`.
- The customer's transcript wins: to fix a word, `GET /v1/speech/transcripts/{id}/captions`, edit the text,
  and send the list back as `captions.captions` — timing is kept when the word count is unchanged.
