🎬

ReelForge API

v1.0 Documentation

Overview

The ReelForge API allows you to programmatically generate AI-powered videos. Available for Mogul and Empire plan subscribers.

Base URL

https://reelforge-api.onrender.com/api/v1
🎬

Generate Videos

Create AI videos programmatically

📊

Track Progress

Poll status or use webhooks

📁

Manage Library

List, retrieve, delete videos

🔔

Webhooks

Get notified when videos complete

Authentication

All API requests require an API key. Include it in the X-API-Key header or as a Bearer token in the Authorization header.

Getting an API Key

  1. Go to Settings → API Keys in your dashboard
  2. Click "Create API Key"
  3. Give it a name and optionally set an expiration
  4. Copy and securely store the key (shown only once)

Using Your API Key

# Option 1: X-API-Key header
curl -H "X-API-Key: rf_your_api_key_here" \
  https://reelforge-api.onrender.com/api/v1/account

# Option 2: Bearer token
curl -H "Authorization: Bearer rf_your_api_key_here" \
  https://reelforge-api.onrender.com/api/v1/account

Rate Limits

API requests are rate limited to ensure fair usage.

PlanRequests/MinVideos/Day
Mogul10020
Empire10050

Rate limit headers are included in all responses: X-RateLimit-Remaining, X-RateLimit-Reset

Videos

POST/videos/generate

Generate a new AI video. Returns immediately with a video ID for status polling.

Request Body

{
  "niche": "motivation",       // Required (or custom_topic)
  "custom_topic": null,        // Optional - your own topic
  "voice": "adam",             // Optional - voice ID
  "style": "cinematic",        // Optional - visual style
  "duration": 30,              // Optional - seconds (30, 45, 60, 90)
  "include_music": true,       // Optional
  "include_captions": true,    // Optional
  "webhook_url": "https://..." // Optional - receive completion notification
}

Response

{
  "success": true,
  "message": "Video generation started.",
  "data": {
    "video_id": "abc123",
    "status": "pending",
    "estimated_time": "2-5 minutes",
    "status_url": "https://reelforge-api.onrender.com/api/v1/videos/abc123/status"
  }
}

Available Niches

motivationfinancehorrorfactshistorysciencephilosophypsychologyhealthtechnologynaturemysterylife-tipsmindfulnessproductivity
GET/videos

List your videos with pagination.

Query Parameters

ParameterDefaultDescription
page1Page number
limit20Results per page (max 100)
statusallFilter: pending, processing, completed, failed
GET/videos/:id/status

Check video generation status. Use this for polling.

Response (Completed)

{
  "success": true,
  "data": {
    "id": "abc123",
    "status": "completed",
    "video_url": "https://...",
    "thumbnail_url": "https://...",
    "updated_at": "2025-01-04T12:00:00Z"
  }
}
DELETE/videos/:id

Delete a video from your library.

Account

GET/account

Get account information and usage statistics.

{
  "success": true,
  "data": {
    "account": {
      "id": "user_123",
      "email": "you@example.com",
      "plan": "mogul"
    },
    "usage": {
      "videos_this_month": 15,
      "videos_limit": 60,
      "videos_remaining": 45,
      "total_videos": 127
    },
    "rate_limits": {
      "requests_per_minute": 100,
      "videos_per_day": 20
    }
  }
}

Webhooks

Instead of polling, you can provide a webhook_url when generating a video. We'll send a POST request when the video is ready.

Webhook Payload

{
  "event": "video.completed",
  "data": {
    "video_id": "abc123",
    "status": "completed",
    "video_url": "https://...",
    "thumbnail_url": "https://..."
  }
}

Note: Your webhook endpoint should respond with a 2xx status code within 30 seconds. We'll retry up to 3 times with exponential backoff.

Errors

The API uses standard HTTP status codes and returns consistent error responses.

CodeMeaning
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - Plan upgrade required or limit exceeded
404Not Found - Resource doesn't exist
429Too Many Requests - Rate limit exceeded
500Internal Server Error

Error Response Format

{
  "error": "Bad Request",
  "message": "Either niche or custom_topic is required."
}

Code Examples

Python

import requests

API_KEY = "rf_your_api_key_here"
BASE_URL = "https://reelforge-api.onrender.com/api/v1"

# Generate a video
response = requests.post(
    f"{BASE_URL}/videos/generate",
    headers={"X-API-Key": API_KEY},
    json={
        "niche": "motivation",
        "duration": 30
    }
)

video_id = response.json()["data"]["video_id"]
print(f"Video ID: {video_id}")

# Poll for completion
import time
while True:
    status = requests.get(
        f"{BASE_URL}/videos/{video_id}/status",
        headers={"X-API-Key": API_KEY}
    ).json()
    
    if status["data"]["status"] == "completed":
        print(f"Video URL: {status['data']['video_url']}")
        break
    elif status["data"]["status"] == "failed":
        print(f"Error: {status['data']['error']}")
        break
    
    time.sleep(10)  # Check every 10 seconds

JavaScript/Node.js

const API_KEY = "rf_your_api_key_here";
const BASE_URL = "https://reelforge-api.onrender.com/api/v1";

async function generateVideo() {
  // Start generation
  const response = await fetch(`${BASE_URL}/videos/generate`, {
    method: "POST",
    headers: {
      "X-API-Key": API_KEY,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      niche: "motivation",
      duration: 30,
      webhook_url: "https://your-server.com/webhook"
    })
  });
  
  const { data } = await response.json();
  console.log("Video ID:", data.video_id);
  return data.video_id;
}

generateVideo();