> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.reka.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.reka.ai/_mcp/server.

# Create Clips

POST https://vision-agent.api.reka.ai/v1/clips
Content-Type: application/json

Generate highlight reels from longer videos

Reference: https://docs.reka.ai/vision/api-reference/clip-generation/create-reel-v-1-clips-post

## Authentication

- `X-Api-Key` header (required) — API key authentication via X-Api-Key header
- `Authorization` header (bearer token, required) — Bearer token authentication via Authorization header

## Request

### Query parameters

- `reel_quality` (enum, optional)
  - Allowed values: `premium`, `lite`, `fallback`, `full_video`

### Headers

- `X-Enable-Overwrite-Metering` (string, optional, nullable)

### Body (application/json)

This endpoint expects a ClipRequest.

- `video_urls` (list of string, required) — List of video URLs to process
- `prompt` (string, optional, nullable, default: Create an engaging short video highlighting the best moments) — Prompt for video generation
- `generation_config` (ClipGenerationConfig, optional) — Grouped generation configuration
- `rendering_config` (ClipRenderingConfig, optional) — Grouped rendering configuration
- `stream` (boolean, optional, default: false) — Whether to stream the generation process

## Response

### 202

Successful Response

- `any`

## Types

### ClipGenerationConfig

Generation settings for the Clip API

- `template` (enum, optional) — Template type for generation
  - Allowed values: `compilation`, `moments`, `voiceover`, `trailer`, `caption_only`
- `num_generations` (integer, optional, nullable) — Number of clips to generate. When provided, must be 1-3. Omit to auto-derive the count from the effective video duration: 3 for videos up to 45 minutes, +1 per additional 15 minutes, capped at 12. The resolved count is returned in the response once auto-resolution completes.
- `min_duration_seconds` (integer, optional, default: 0) — Minimum duration in seconds
- `max_duration_seconds` (integer, optional, default: 90) — Maximum duration in seconds
- `source_start_time` (integer, optional, nullable) — Start time in seconds for source video download.
- `source_end_time` (integer, optional, nullable) — End time in seconds for source video download.
- `translated_subtitles_target_language` (enum, optional, nullable) — Optional locale to auto-generate translated subtitles after generation completes.
  - Allowed values: `bg_BG`, `cs_CZ`, `da_DK`, `de_DE`, `el_GR`, `en_GB`, `en_US`, `es_ES`, `es_MX`, `fi_FI`, `fil_PH`, `fr_CA`, `fr_FR`, `hi_IN`, `hu_HU`, `id_ID`, `it_IT`, `ja_JP`, `ko_KR`, `lt_LT`, `ms_MY`, `nl_NL`, `no_NO`, `pl_PL`, `pt_BR`, `pt_PT`, `ro_RO`, `ru_RU`, `hr_HR`, `sk_SK`, `sl_SI`, `sr_Cyrl_RS`, `sr_Latn_RS`, `sv_SE`, `ta_IN`, `th_TH`, `tr_TR`, `uk_UA`, `vi_VN`, `zh_CN`, `zh_TW`
- `translated_subtitles_group_length` (integer, optional, nullable) — Max character length of a translated subtitle group before splitting on word boundaries.

### ClipRenderingConfig

Rendering settings for the Clip API

- `show_watermark` (boolean, optional, default: false) — Whether to display reka watermark
- `subtitles` (boolean, optional, default: true) — Whether to enable subtitles
- `aspect_ratio` (enum, optional) — Aspect ratio for the video
  - Allowed values: `9:16`, `9:16-split`, `16:9`, `4:5`, `1:1`
- `resolution` (enum, optional) — Target resolution for the video
  - Allowed values: `240`, `360`, `480`, `720`, `1080`
- `caption_style` (CaptionFontConfig, optional, nullable) — Caption styling overrides
- `layout` (enum, optional) — How to fit the source video into the target aspect_ratio. 'ai' (default) reframes the source to fill the target, keeping the most relevant content in view. 'fill' center-crops the source to fill the target canvas (no AI reframing, no split screens). 'fit' preserves the entire source frame inside the target, adding bars on the unfilled sides.
  - Allowed values: `ai`, `ai2`, `fill`, `fit`

### CaptionFontConfig

- `desired_font_size` (double, optional, nullable)
- `text_transform` (enum, optional, nullable)
  - Allowed values: `initial`, `uppercase`, `lowercase`
- `text_color` (string, optional, nullable)
- `highlight_color` (string, optional, nullable)
- `stroke_color` (string, optional, nullable)
- `position` (enum, optional, nullable)
  - Allowed values: `top`, `bottom`, `middle`
- `font_family` (enum, optional, nullable)
  - Allowed values: `BebasNeue`, `Bangers`, `RobotoCondensed`, `Lato`, `CaptionFont`

## Examples

**Request**

```json
{
  "video_urls": [
    "https://example.com/source-video.mp4"
  ]
}
```

**SDK Code**

```python
import requests

url = "https://vision-agent.api.reka.ai/v1/clips"

payload = { "video_urls": ["https://example.com/source-video.mp4"] }
headers = {
    "X-Api-Key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://vision-agent.api.reka.ai/v1/clips';
const options = {
  method: 'POST',
  headers: {'X-Api-Key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"video_urls":["https://example.com/source-video.mp4"]}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://vision-agent.api.reka.ai/v1/clips"

	payload := strings.NewReader("{\n  \"video_urls\": [\n    \"https://example.com/source-video.mp4\"\n  ]\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-Api-Key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://vision-agent.api.reka.ai/v1/clips")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"video_urls\": [\n    \"https://example.com/source-video.mp4\"\n  ]\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://vision-agent.api.reka.ai/v1/clips")
  .header("X-Api-Key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"video_urls\": [\n    \"https://example.com/source-video.mp4\"\n  ]\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://vision-agent.api.reka.ai/v1/clips', [
  'body' => '{
  "video_urls": [
    "https://example.com/source-video.mp4"
  ]
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-Api-Key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://vision-agent.api.reka.ai/v1/clips");
var request = new RestRequest(Method.POST);
request.AddHeader("X-Api-Key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"video_urls\": [\n    \"https://example.com/source-video.mp4\"\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-Api-Key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = ["video_urls": ["https://example.com/source-video.mp4"]] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://vision-agent.api.reka.ai/v1/clips")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```