Video Generation API
JSON In. Video Out.
Generate videos programmatically from JSON. Credit-based pricing. White-label ready.
{
"width": 1920,
"height": 1080,
"scenes": [
{
"background-color": "#0a0e1a",
"elements": [
{
"type": "text",
"text": "Hello, PhantomFlow!",
"font_size": 72,
"color": "#06b6d4",
"position": "center"
}
]
}
]
}How It Works
Three steps to your first video
Write JSON
Define scenes, elements, text, audio, and transitions in a single JSON document.
POST to API
Send your JSON script to our render endpoint. We handle queue, render, and delivery.
Get MP4
Poll for status or use webhooks. Download your video from S3. Stream, embed, or export.
Built for Developers
Everything you need to generate video at scale
9 Element Types
Text, image, video, audio, shape, component, voice, subtitles, lottie.
Built-in TTS
Coqui (free) + ElevenLabs for natural voices. 50+ voices, 20+ languages.
HTML/CSS Overlays
Render any HTML component as a video overlay. Puppeteer-powered.
15+ Transitions
Fade, wipe, slide, zoom, crossfade, and more. Scene-level or element-level.
Pay Per Second
1 credit = 1 second of rendered video. No per-video fees. Free tier to start.
White-Label Ready
Reseller system with custom branding, domains, and wholesale pricing.
See It in Action
Generate a marketing video with text overlays, background music, and branded lower-third — in a single API call.
- 9 element types
- Scene-level audio
- Template variables
- Webhook callbacks
import { PhantomFlowClient } from '@phantomflow/sdk';
const client = new PhantomFlowClient({
apiKey: process.env.PF_API_KEY
});
const job = await client.render({
width: 1920,
height: 1080,
scenes: [{
"background-color": "#0a0e1a",
elements: [
{ type: "video", src: "https://cdn.example.com/bg.mp4" },
{
type: "text",
text: "Summer Sale — 40% Off",
font_size: 64,
color: "#ffffff",
position: "center"
},
{
type: "audio",
src: "https://cdn.example.com/music.mp3",
volume: 0.3
}
]
}]
});
// Poll for completion
const result = await client.waitForJob(job.id);
console.log(result.url);
// => https://cdn.phantomflow.dev/output/abc123.mp4Built for Every Use Case
From social media to enterprise video pipelines
Social Media Clips
Auto-generate daily content for TikTok, Reels, and Shorts from data feeds.
See ExampleWorks With Your Stack
SDKs, no-code integrations, and export options
Switching from JSON2Video?
PhantomFlow speaks the same JSON schema. Change your API endpoint and you are done. No code changes. No data migration.
Ready to Generate Your First Video?
Get your free API key and render a video in under 60 seconds. No credit card required. 100 free credits.