> For the complete documentation index, see [llms.txt](https://bountyv.gitbook.io/vdocs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bountyv.gitbook.io/vdocs/video-api/videos-generate.md).

# Reel Recreate

Recreate a reference reel with a custom face identity. Asynchronous — submit a job, poll for completion.

```
POST /api/v1/videos/generate
```

Asynchronous. Returns a `job_id` immediately (`202 Accepted`); poll for the result.

## Authentication

`Authorization: Bearer sk_live_...`. See [Authentication](/vdocs/authentication.md).

## Request

**Content-Type:** `multipart/form-data`

| Field                 | Type                                                | Required | Default    | Description                                                                                                                                                                     |
| --------------------- | --------------------------------------------------- | -------- | ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `face`                | File                                                | ✅        | —          | Identity photo — the person to render into the reel. **Repeatable** (or `face[]`): up to 4 photos of the same person. See [Multiple identity photos](#multiple-identity-photos) |
| `reference_video_url` | string (URL)                                        | ✅        | —          | Public URL of the reference reel to recreate                                                                                                                                    |
| `prompt`              | string                                              | —        | auto       | Optional scene description to bias the generation (auto-generated if omitted)                                                                                                   |
| `quality`             | `"standard"` \| `"pro"`                             | —        | `pro`      | Model tier. `pro` is slower and higher fidelity                                                                                                                                 |
| `add_captions`        | `"true"` / `"false"`                                | —        | `false`    | Burn auto-captions onto the output video                                                                                                                                        |
| `caption_style`       | `"glow"` \| `"boxed"` \| `"outline"` \| `"minimal"` | —        | `glow`     | Caption visual style (only used when `add_captions` is true)                                                                                                                    |
| `audio_mode`          | `"original"` \| `"mute"`                            | —        | `original` | Keep the reference reel's audio, or mute the output                                                                                                                             |
| `high_fidelity`       | `"true"` / `"false"`                                | —        | `false`    | Extra identity-preservation pass. Slower; better likeness                                                                                                                       |

### Multiple identity photos

Send `face` up to 4 times (or as `face[]`) with photos of the **same person** from different angles — frontal, profile, three-quarter, full body. The first is treated as the main view; the rest feed the composite stage and Kling's element binding, which is the biggest lever against identity drift over a long clip. Photos of different people will blend rather than pick one.

Sending more than 4 returns `400` with a `max_reference_images` field.

### Supported reference video sources

Any publicly accessible URL:

* TikTok
* Instagram Reels
* YouTube Shorts
* Direct MP4 links

Private or login-gated URLs will fail.

Credits are deducted up front and refunded automatically if the job fails to dispatch or the pipeline errors out.

## Response

```json
{
  "job_id": "nH7bK9xQ2m",
  "status": "queued",
  "reference_images": 1,
  "max_reference_images": 4,
  "charged_cents": 85,
  "balance_cents": 4915,
  "poll_url": "/api/v1/jobs/nH7bK9xQ2m"
}
```

HTTP status: `202 Accepted`.

Poll [`GET /api/v1/jobs/{job_id}`](/vdocs/video-api/jobs.md) every 5–10 seconds until the job completes or fails.

### Typical timing

* Queue time: 0–30 seconds
* Generation: 1–3 minutes for `standard`, 3–6 minutes for `pro`
* With `high_fidelity=true`: add 1–2 minutes

## Example

```bash
curl -X POST https://substance-api.com/api/v1/videos/generate \
  -H "Authorization: Bearer sk_live_..." \
  -F "face=@face.jpg" \
  -F "reference_video_url=https://www.tiktok.com/@user/video/12345" \
  -F "quality=pro" \
  -F "add_captions=true" \
  -F "caption_style=glow"
```

## Errors

| Status | When                                                                                              |
| ------ | ------------------------------------------------------------------------------------------------- |
| `400`  | Missing `face`, more than 4 `face` files, missing `reference_video_url`, or the URL was malformed |
| `401`  | Invalid or missing API key                                                                        |
| `402`  | Insufficient credits                                                                              |
| `500`  | Failed to store the face image — retry                                                            |
| `502`  | Pipeline dispatch failed (balance auto-refunded)                                                  |
| `503`  | Pipeline temporarily offline                                                                      |

Jobs that fail mid-pipeline return `status: "failed"` when polled and are refunded automatically. See [Errors](/vdocs/errors.md) for full details.

## Pricing

Billed per call — see [Credits & pricing](/vdocs/account/credits.md) for current rates.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://bountyv.gitbook.io/vdocs/video-api/videos-generate.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
