Video
Generate a video from a script, idea, or blog URL. Supports automatic visual selection, AI-generated visuals, voiceover, subtitles, and more.
Request
POSThttps://api.fliki.ai/v1/generate/video
Headers
{
"Content-type": "application/json",
"Authorization": "Bearer API_KEY"
}
| Key | Value | Description |
|---|---|---|
| Content-Type | application/json | Specifies that the request body format is JSON, allowing the server to parse the data correctly. |
| Authorization | Bearer YOUR_API_KEY | Generate your API Key in the automation section and replace YOUR_API_KEY with your actual key. API access is available on request — contact support to enable it for your account. |
Body
{
"file": String, // optional name for the folder created in your workspace
"payload": [
{
"workflowType": "script" | "idea" | "url",
"workflowFormat": "video",
// Input — required field depends on workflowType
"content": String, // required for "script" (script text) and "url" (blog/article URL)
"prompt": String, // required for "idea" (topic or idea)
"voiceId": String,
"aspectRatio": "16:9" | "9:16" | "1:1",
"resolution": "1080p" | "720p" | "480p" | "360p",
"extension": "mp4" | "mov" | "mp3" | "wav",
"duration": Number,
"visuals": "stock" | "ai" | "library",
"mediaUrls": [String], // public image URLs from your library; mixes with stock/ai, or set visuals:"library" for library only
"artStyle": String, // see Field values section for valid keys
"aiVideoModel": "runware-seedance-pro-fast" | "runware-p-video" | "runware-pixverse-v5-fast" | "runware-ltx-2-fast" | "runware-kling-2.5-turbo", // requires visuals:"ai"
"aiVideoClipPercentage": Number,
"imageAnimationPreset": "None" | "Mix:Subtle Flow" | "Mix" | "Mix:Dramatic",
"bgMusicVolume": Number,
"generateSfx": Boolean,
"addPauses": Boolean,
"subtitlePresetId": String,
"highlightSubtitles": Boolean,
"templateId": String,
"brandId": String, // applies your brand kit: logo watermark, intro/outro, colours and fonts
"sceneBreakdown": "auto" | "lineBreak" | "sentence",
"fileName": String,
"shouldExport": Boolean
}
]
}
Pass multiple objects in payload to generate several videos in one request.
Top-level fields:
| Key | Type | Description | Required | Default |
|---|---|---|---|---|
| payload | array | Array of video job objects (see below). Send one or many. | Yes | N/A |
| file | string | Name for the folder created in your workspace. | - | N/A |
| folderId | string | ID of an existing workspace folder to place files into. Find it by opening a folder in Fliki and copying the ID after ?folder= in the URL. If omitted, a new folder named by file is created. | - | N/A |
Each object in payload:
| Key | Type | Description | Required | Default |
|---|---|---|---|---|
| workflowType | string | Type of video to generate. One of script, idea, or url. | Yes | N/A |
| workflowFormat | string | Must be video. | Yes | N/A |
| content | string | The script text (for script) or a blog/article URL (for url). Max 10000 characters. | Yes (for script / url) | N/A |
| prompt | string | The topic or idea to generate a video about. Max 10000 characters. | Yes (for idea) | N/A |
| voiceId | string | The identifier for the voice to be used for the voiceover. | Yes | N/A |
| aspectRatio | string | Output aspect ratio. One of 16:9, 9:16, or 1:1. | - | 16:9 |
| resolution | string | Export resolution. One of 1080p, 720p, 480p, or 360p. Video only. | - | 1080p |
| extension | string | Export format. mp4 or mov for video; mp3 or wav for audio. | - | mp4 |
| duration | number | Target video duration in minutes (1–15, subject to your plan's max export length). | - | N/A |
| visuals | string | Fill source. stock uses stock footage; ai generates visuals with AI; library uses only your mediaUrls. | - | stock |
| mediaUrls | array | Public image URLs (max 100) imported into your media library and used as scene visuals — your own media (the "My library" source). Combines with the visuals fill source; set visuals to library to use these only. Required when visuals is library. | Yes (for library) | N/A |
| artStyle | string | Art style for AI-generated visuals. Used when visuals is ai. See valid values. | - | cinematic |
| aiVideoModel | string | AI video model for generating video clips instead of static images. Requires a paid plan and visuals set to ai. See valid values. | - | N/A |
| aiVideoClipPercentage | number | Percentage of scenes (0–100) to fill with AI video clips. Only applies when aiVideoModel is set and visuals is ai. | - | 20 |
| imageAnimationPreset | string | Motion preset applied to AI-generated images. See valid values. | - | N/A |
| bgMusicVolume | number | Background music volume from 0 (muted) to 100 (full). | - | 20 |
| generateSfx | boolean | Automatically generate contextual sound effects for each scene. | - | true |
| addPauses | boolean | Insert natural pauses between sentences in the voiceover. | - | false |
| subtitlePresetId | string | ID of a subtitle preset. See Finding your IDs. Only applies when templateId is not set. | - | N/A |
| highlightSubtitles | boolean | Highlight the currently spoken word in subtitles (karaoke style). | - | false |
| templateId | string | ID of a Fliki template to apply to the video. See Finding IDs. | - | N/A |
| brandId | string | ID of a brand kit to apply. Adds your logo watermark, intro and outro clips, and brand colours and fonts. See Branding. | - | N/A |
| sceneBreakdown | string | How to split the script into scenes. See valid values. | - | auto |
| fileName | string | Name for the created file shown in your Fliki workspace. | - | Untitled file |
| shouldExport | boolean | Automatically export the file after generation. | - | false |
Finding voice and template IDs
See Finding your IDs for every ID this endpoint accepts
(voiceId, templateId, subtitlePresetId, and so on) and the two ways to get
each: copy it from the app, or fetch it from an endpoint.
Branding
Set brandId to apply one of your brand kits to every video the request creates.
Get the ID from the brand kits endpoint, or copy it from the end of
the kit's URL at app.fliki.ai/brand-kits.
Applying a kit does four things:
- puts your logo watermark in the corner of every scene,
- adds your intro clip as the first scene and your outro clip as the last,
- recolours the video with your brand colours,
- sets text in your brand fonts.
Whatever the kit is missing is simply skipped: a kit with only a logo adds only the
watermark. The kit's voice is never applied here, so the voiceId you send always
narrates the video. Note that intro and outro clips lengthen the video, which is
reflected in the credits the export costs.
A brandId that names a kit you cannot use is rejected with
Brand kit not found or deleted. rather than being ignored, so a typo never ships
an unbranded video without telling you. Brand kits are available on Standard plans
and above.
Field values
artStyle — Art style for AI-generated images. Only applies when visuals is ai.
| Value | Label |
|---|---|
cinematic | Cinematic |
realistic | Realistic |
anime | Anime |
illustration | Illustration |
comicBook | Comic book |
threeDimensionModel | 3D model |
fantasyArt | Fantasy art |
waterColor | Watercolor |
lineArt | Line art |
modelingCompound | Clay |
whimsical | Whimsical |
biblical | Biblical |
filmNoir | Film Noir |
tinyWorld | Tiny World |
technicalIllustration | Technical illustration |
aiVideoModel — AI model used to generate video clips (paid plans only). Requires visuals to be ai: only AI-generated images can be converted into clips, so a request that pairs aiVideoModel with visuals of stock or library (the default is stock) is rejected. Leave unset to skip AI video and use stock footage or static AI images instead.
| Value | Name | Notes |
|---|---|---|
runware-seedance-pro-fast | Seedance Pro Fast | Fastest and most affordable; good for drafts and B-roll |
runware-p-video | P-Video | Affordable everyday model for social and marketing clips |
runware-pixverse-v5-fast | PixVerse v5 Fast | Best for anime, sci-fi, and template-driven viral effects |
runware-ltx-2-fast | LTX-2 Fast | Open-source model; supports clips up to 20 seconds |
runware-kling-2.5-turbo | Kling 2.5 Turbo | Cinematic look with weighted physics; great for B-roll |
imageAnimationPreset — Motion applied to AI-generated images. Has no effect when visuals is stock.
| Value | Description |
|---|---|
None | No motion — images are static |
Mix:Subtle Flow | Gentle Ken Burns-style movement |
Mix | Energetic short-form motion (TikTok style) |
Mix:Dramatic | Bold, high-impact motion |
sceneBreakdown — Controls how the script is split into scenes.
| Value | Description |
|---|---|
auto | AI decides the best split points (recommended) |
lineBreak | Split at every new line |
sentence | Split at every sentence |
Response
{
"success": Boolean,
"data": {
"folderId": String,
"filesCreated": [String]
}
}
| Key | Type | Description |
|---|---|---|
| success | boolean | true when the jobs were scheduled successfully |
| data.folderId | string | Identifier of the folder containing the generated files |
| data.filesCreated | string[] | Array of file IDs, one per object submitted in payload |
Checking Status
Video generation is asynchronous. Poll the status endpoint every 10 seconds using a fileId from data.filesCreated.
GET https://api.fliki.ai/v1/generate/status?fileId=<fileId>
{
"fileId": String,
"status": "queued" | "processing" | "success" | "error" | "canceled",
"progress": Number,
"download": String // CDN URL — only present when status is "success"
}
Once status is success, the download field contains the MP4 URL.
Opening in Editor
To edit the generated video in Fliki, open:
https://app.fliki.ai/editor/<fileId>
Limits
- Rate limit: 10 requests per 10 minutes per API key
- Pending job cap: 20 queued or processing jobs at a time
Example
- Bash
- TypeScript
- Python
- Go
curl \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"payload": [{"workflowType": "script", "workflowFormat": "video", "content": "Your script here...", "voiceId": "..."}]}' \
-X POST https://api.fliki.ai/v1/generate/video
const apiKey = '<API_KEY>';
const url = 'https://api.fliki.ai/v1/generate/video';
const data = {
payload: [
{
workflowType: 'script',
workflowFormat: 'video',
content: 'Your script here...',
voiceId: '...',
aspectRatio: '16:9',
visuals: 'stock',
resolution: '1080p',
shouldExport: true,
},
],
};
async function generateVideo() {
const response = await fetch(url, {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'Content-Type': 'application/json',
},
body: JSON.stringify(data),
});
const result = await response.json();
const fileId = result.data.filesCreated[0];
// Poll for status
while (true) {
await new Promise((r) => setTimeout(r, 10000));
const statusRes = await fetch(
`https://api.fliki.ai/v1/generate/status?fileId=${fileId}`,
{ headers: { Authorization: `Bearer ${apiKey}` } }
);
const status = await statusRes.json();
if (status.status === 'success') {
console.log('Download URL:', status.download);
break;
}
if (status.status === 'error' || status.status === 'canceled') {
console.error('Generation failed:', status.status);
break;
}
}
}
generateVideo();
import requests
import time
api_key = "<API_KEY>"
url = "https://api.fliki.ai/v1/generate/video"
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
data = {
"payload": [
{
"workflowType": "script",
"workflowFormat": "video",
"content": "Your script here...",
"voiceId": "...",
"aspectRatio": "16:9",
"visuals": "stock",
"resolution": "1080p",
"shouldExport": True,
}
]
}
response = requests.post(url, headers=headers, json=data)
file_id = response.json()["data"]["filesCreated"][0]
# Poll for status
while True:
time.sleep(10)
status_res = requests.get(
f"https://api.fliki.ai/v1/generate/status?fileId={file_id}",
headers=headers
)
status = status_res.json()
if status["status"] == "success":
print("Download URL:", status["download"])
break
if status["status"] in ("error", "canceled"):
print("Generation failed:", status["status"])
break
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"time"
)
func main() {
apiKey := "<API_KEY>"
url := "https://api.fliki.ai/v1/generate/video"
data := map[string]interface{}{
"payload": []map[string]interface{}{
{
"workflowType": "script",
"workflowFormat": "video",
"content": "Your script here...",
"voiceId": "...",
"aspectRatio": "16:9",
"visuals": "stock",
"resolution": "1080p",
"shouldExport": true,
},
},
}
jsonData, _ := json.Marshal(data)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Set("Authorization", "Bearer "+apiKey)
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
resp, _ := client.Do(req)
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
filesCreated := result["data"].(map[string]interface{})["filesCreated"].([]interface{})
fileID := filesCreated[0].(string)
// Poll for status
for {
time.Sleep(10 * time.Second)
statusReq, _ := http.NewRequest("GET",
fmt.Sprintf("https://api.fliki.ai/v1/generate/status?fileId=%s", fileID), nil)
statusReq.Header.Set("Authorization", "Bearer "+apiKey)
statusResp, _ := client.Do(statusReq)
var status map[string]interface{}
json.NewDecoder(statusResp.Body).Decode(&status)
if status["status"] == "success" {
fmt.Println("Download URL:", status["download"])
break
}
if status["status"] == "error" || status["status"] == "canceled" {
fmt.Println("Generation failed:", status["status"])
break
}
}
}