Clip Generation API (Reka Clip)

With the Reka Clip Vision API, you can automatically transform long videos into engaging short clips using AI-powered highlight detection.

To try this API through a no-code interface, check out Reka Clip, where you can submit a video link and generate clips instantly.

To see an example of integrating Reka Clip with n8n, refer to the sample workflow available on GitHub here

Usage

We offer two ways to generate reels from your videos:

  • Option 1: 2‑step workflow
    • Submit a job with POST /v1/creator/reels
    • Poll job status with GET /v1/creator/reels/{id} until completed
  • Option 2: Single streaming request
    • Submit a job to POST /v1/creator/reels with stream=true to receive real‑time progress updates (SSE)

Option 1: Submit and poll

1️⃣ Submit a generation job:

Endpoint

  • POST /v1/creator/reels

Headers

  • Content-Type: application/json
  • X-Api-Key: YOUR_API_KEY

Request body

  • video_urls (array[string], required): URLs of input videos
  • prompt (string, required): Description of the reel to generate
  • generation_config (object, optional):
    • template (“moments” | “compilation”, default: “moments”)
    • num_generations (integer, default: 1)
    • min_duration_seconds (integer, optional)
    • max_duration_seconds (integer, optional)
  • rendering_config (object, optional):
    • subtitles (boolean, default: true)
    • aspect_ratio (string, default: “9:16”)

Request example

Bash

$curl -X POST "https://vision-agent.api.reka.ai/v1/creator/reels" \
> -H "X-Api-Key: $REKA_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "video_urls": ["https://www.youtube.com/watch?v=U0Cd8jbj5zg"],
> "prompt": "Create an engaging short video highlighting the best moments",
> "generation_config": {
> "template": "moments",
> "num_generations": 3,
> "min_duration_seconds": 0,
> "max_duration_seconds": 60
> },
> "rendering_config": {
> "subtitles": true,
> "aspect_ratio": "9:16"
> }
> }'

Python

1import requests, json
2
3BASE_URL = "https://vision-agent.api.reka.ai"
4API_KEY = "YOUR_API_KEY" # or use an environment variable
5
6endpoint_url = f"{BASE_URL}/v1/creator/reels"
7payload = {
8 "video_urls": ["https://www.youtube.com/watch?v=U0Cd8jbj5zg"],
9 "prompt": "Create an engaging short video highlighting the best moments",
10 "generation_config": {
11 "template": "moments",
12 "num_generations": 3,
13 "min_duration_seconds": 0,
14 "max_duration_seconds": 60,
15 },
16 "rendering_config": {
17 "subtitles": True,
18 "aspect_ratio": "9:16",
19 },
20}
21headers = {
22 "Content-Type": "application/json",
23 "X-Api-Key": API_KEY,
24}
25
26response = requests.post(endpoint_url, headers=headers, json=payload)
27response.raise_for_status()
28result = response.json()
29print(json.dumps(result, indent=2))
30
31generation_id = result["id"]

Response example (job accepted)

1{
2 "id": "156b59b3-82a2-4619-99c5-954d80d3e254",
3 "status": "queued",
4 "created_at": "2026-01-17T19:23:20.878691+00:00",
5 "updated_at": "2026-01-17T19:23:20.878691+00:00",
6 "generation_config": {
7 "template": "moments",
8 "num_generations": 3,
9 "min_duration_seconds": 0,
10 "max_duration_seconds": 60
11 },
12 "rendering_config": {
13 "subtitles": true,
14 "aspect_ratio": "9:16"
15 },
16 "video_urls": [
17 "https://www.youtube.com/watch?v=1vM3Xsiwsao"
18 ],
19 "prompt": "Create an engaging short video highlighting the best moments"
20}

When a job is successfully submitted, the initial status will be queued.

Make sure to save the id — you’ll use it to check generation status.

2️⃣ Check generation status

  • GET /v1/creator/reels/{id}

Returns job metadata and, when status is completed, an output array with generated reels.

Request example

Bash

$GEN_ID="YOUR_GENERATION_ID"
>curl -X GET "https://vision-agent.api.reka.ai/v1/creator/reels/${GEN_ID}" \
> -H "X-Api-Key: $REKA_API_KEY" \
> -H "Content-Type: application/json" | jq .

Python

1url = f"{BASE_URL}/v1/creator/reels/{generation_id}"
2headers = {"X-Api-Key": API_KEY}
3
4resp = requests.get(url, headers=headers)
5resp.raise_for_status()
6status = resp.json()
7print(json.dumps(status, indent=2))

Response example (processing)

1{
2 "id": "be22635b-8d25-4c7a-b885-b1dcba82973d",
3 "status": "processing",
4 "created_at": "2026-01-18T19:10:13.36329+00:00",
5 "updated_at": "2026-01-18T19:10:13.36329+00:00",
6 "generation_config": {
7 "template": "moments",
8 "num_generations": 3,
9 "min_duration_seconds": 0,
10 "max_duration_seconds": 60
11 },
12 "rendering_config": {
13 "subtitles": true,
14 "aspect_ratio": "9:16"
15 },
16 "video_urls": [
17 "https://www.youtube.com/watch?v=x6-vh91YnuY"
18 ],
19 "prompt": "Create an engaging short video highlighting the best moments",
20 "output": [],
21 "error_message": null
22}

Note: The status field indicates the current stage of the generation job, which happens to be processing in the above example.

Job lifecycle

A job will transition through the following states:

queuedstartingdownloadingindexingpreprocessingprocessingcompleted

Once the status is completed, the response will include generated clip outputs, as shown below.

Response example (completed)

1{
2 "id": "156b59b3-82a2-4619-99c5-954d80d3e254",
3 "status": "completed",
4 "created_at": "2026-01-17T19:23:20.878691+00:00",
5 "updated_at": "2026-01-17T19:27:03.650333+00:00",
6 "generation_config": {
7 "template": "moments",
8 "num_generations": 3,
9 "min_duration_seconds": 0,
10 "max_duration_seconds": 60
11 },
12 "rendering_config": {
13 "subtitles": true,
14 "aspect_ratio": "9:16"
15 },
16 "video_urls": [
17 "https://www.youtube.com/watch?v=1vM3Xsiwsao"
18 ],
19 "prompt": "Create an engaging short video highlighting the best moments",
20 "output": [
21 {
22 "title": "Marcelo's Wild Family Party Stories",
23 "video_url": "https://guardian-user-uploads-prod.cdn.reka.ai/org-a10e5eec-1028-49fa-9144-ef676e3328e1/reels/2ab608e5b0d7704b521aae004d1d7b2c",
24 "caption": "When your cousins make you do the most unhinged things at family parties 😭💀 Marcelo's comedy is unmatched!",
25 "hashtags": [
26 "#MarceloHernandez",
27 "#StandUp",
28 "#Comedy",
29 "#FamilyParty",
30 "#Cousins",
31 "#LiveComedy",
32 "#Funny",
33 "#Relatable",
34 "#Netflix",
35 "#AmericanBoy"
36 ],
37 "ai_score": 82
38 },
39 {
40 "title": "The Ultimate Test Fail Story",
41 "video_url": "https://guardian-user-uploads-prod.cdn.reka.ai/org-a10e5eec-1028-49fa-9144-ef676e3328e1/reels/53b91df6844880cf225d617dc0e2b282",
42 "caption": "POV: You feel like a genius on a test but forget to write your NAME 💀 Marcelo's story is too relatable!",
43 "hashtags": [
44 "#MarceloHernandez",
45 "#TestFail",
46 "#Epic",
47 "#Relatable",
48 "#Comedy",
49 "#StoryTime",
50 "#Funny",
51 "#Netflix",
52 "#AmericanBoy",
53 "#LateNight"
54 ],
55 "ai_score": 88
56 },
57 {
58 "title": "Marcelo's Viral Sebastian Maniscalco Impression Tutorial",
59 "video_url": "https://guardian-user-uploads-prod.cdn.reka.ai/org-a10e5eec-1028-49fa-9144-ef676e3328e1/reels/702d8d67dff7cae2c2b06dedead0de05",
60 "caption": "When someone asks you to break down your viral SNL impression 😂 Marcelo's Sebastian is TOO accurate!",
61 "hashtags": [
62 "#MarceloHernandez",
63 "#SebastianManiscalco",
64 "#SNLImpression",
65 "#Viral",
66 "#Tutorial",
67 "#Comedy",
68 "#Impression",
69 "#BehindTheScenes",
70 "#TalkShow",
71 "#Perfect"
72 ],
73 "ai_score": 92
74 }
75 ],
76 "error_message": null
77}

Option 2: Streaming in one request

Set stream: true to receive Server-Sent Events (SSE) with progress updates until completion.

Request example

Bash

$curl -N -X POST "https://vision-agent.api.reka.ai/v1/creator/reels" \
> -H "X-Api-Key: $REKA_API_KEY" \
> -H "Content-Type: application/json" \
> -d '{
> "video_urls": ["https://demo-videos-bucket-reka.s3.eu-west-2.amazonaws.com/evYsMdBrFXc.mp4"],
> "prompt": "Create an engaging short video highlighting the best moments",
> "generation_config": {"template": "moments", "num_generations": 1},
> "rendering_config": {"subtitles": true, "aspect_ratio": "9:16"},
> "stream": true
> }'

Python

1import requests, json
2from typing import Generator, Dict, Any
3
4endpoint_url = f"{BASE_URL}/v1/creator/reels"
5payload = {
6 "video_urls": ["https://demo-videos-bucket-reka.s3.eu-west-2.amazonaws.com/evYsMdBrFXc.mp4"],
7 "prompt": "Create an engaging short video highlighting the best moments",
8 "generation_config": {
9 "template": "moments",
10 "num_generations": 1,
11 "min_duration_seconds": 0,
12 "max_duration_seconds": 90,
13 },
14 "rendering_config": {
15 "subtitles": True,
16 "aspect_ratio": "9:16",
17 },
18 "stream": True,
19}
20headers = {
21 "Content-Type": "application/json",
22 "X-Api-Key": API_KEY,
23}
24
25def stream_events(response) -> Generator[Dict[str, Any], None, None]:
26 last_data = None
27 for line in response.iter_lines():
28 if not line:
29 continue
30 decoded = line.decode("utf-8")
31 if decoded.startswith("data: "):
32 try:
33 data = json.loads(decoded[6:])
34 if data != last_data:
35 yield data
36 last_data = data
37 except json.JSONDecodeError:
38 pass
39
40with requests.post(endpoint_url, headers=headers, json=payload, stream=True) as r:
41 r.raise_for_status()
42 for event in stream_events(r):
43 print(json.dumps(event, indent=2))

Streaming event example

1{
2 "id": "ada0bc6f-3540-4bb2-baa0-308e9fcf1d06",
3 "status": "preprocessing",
4 "created_at": "2026-01-18T19:28:49.839838+00:00",
5 "updated_at": "2026-01-18T19:29:33.202844+00:00",
6 "generation_config": {
7 "template": "moments",
8 "num_generations": 1,
9 "min_duration_seconds": 0,
10 "max_duration_seconds": 90
11 },
12 "rendering_config": {
13 "subtitles": true,
14 "aspect_ratio": "9:16"
15 },
16 "video_urls": [
17 "https://www.youtube.com/watch?v=9JbE_HtiewI"
18 ],
19 "prompt": "Create an engaging short video highlighting the best moments"
20}

Note: The status field indicates the current stage of the generation job, which in the above case is preprocessing. See Job Lifecycle for more details on status progression.

Error response example

1{
2 "id": "11add419-fc2e-4491-98fd-e0b362103ff1",
3 "status": "failed",
4 "created_at": "2026-01-18T19:23:05.649501+00:00",
5 "updated_at": "2026-01-18T19:24:16.798044+00:00",
6 "generation_config": {
7 "template": "moments",
8 "num_generations": 1,
9 "min_duration_seconds": 0,
10 "max_duration_seconds": 90
11 },
12 "rendering_config": {
13 "subtitles": true,
14 "aspect_ratio": "9:16"
15 },
16 "video_urls": [
17 "https://www.youtube.com/watch?v=x6-vh91YnuY"
18 ],
19 "prompt": "Create an engaging short video highlighting the best moments",
20 "error_message": "This preview of Reka Clip is limited to videos with a maximum duration of 2 hours.\nPlease contact us if you need support for longer videos!"
21}

If a generation fails, the job enters a terminal failed state and includes an error_message describing the cause.