API Video Batch Generation Tutorial
Step-by-step guide to running a 50-clip video batch job on the Flixly API with concrete model settings and verification steps.
TL;DR
Submit a CSV of 50 prompts to the batch endpoint, select Seedance 2.0 or Kling 3.0, poll for completion, then verify durations and frames before delivery.
A client needs 50 short product videos ready before the morning meeting. You open the API docs and start a batch job with Text to Video.
Set up your workspace
Install the client library and store your API key in an environment variable. Create a new project folder and add a requirements file that pins the exact version used in production.
Choose the right models
Pick Seedance 2.0 for motion consistency on 1080p clips. Switch to Kling 3.0 when you need longer 8-second takes at 24 fps. Veo 3.1 works well for abstract background loops that run 4 seconds each.
Prepare the input list
Build a CSV with 50 rows. Each row holds a prompt, a reference image path, and a duration value between 3 and 8 seconds. Save the file as batch_inputs.csv.
Submit the batch request
Call the endpoint with a POST that includes the CSV and model parameters. The response returns a job ID that you poll every 30 seconds until status equals complete.
Monitor progress
The dashboard at /dashboard shows live queue position and estimated finish time. When the counter hits zero, download the zip that contains all rendered files.
Verify each clip
Open the first five videos in a player and check lip sync on any that used Lip Sync Video. Spot-check frame rate with ffprobe and confirm resolution matches the requested 1920x1080.
Handle failures
If three clips return with artifacts, resubmit only those rows with adjusted seeds. The system keeps the original job ID so you avoid reprocessing the full set.
Export and deliver
Rename files to match your campaign spreadsheet and upload the final package. Total credits used for the run came to 475.
Sample settings table
| Model | Resolution | Duration | FPS | Credits per clip |
|---|---|---|---|---|
| Seedance 2.0 | 1920x1080 | 5s | 24 | 9 |
| Kling 3.0 | 1920x1080 | 8s | 24 | 14 |
| Veo 3.1 | 1280x720 | 4s | 30 | 7 |
Step-by-step batch job
- Export your prompt list to CSV with columns for prompt, image path, seconds, and seed.
- Authenticate using the bearer token stored in the Flixly dashboard.
- POST the CSV path and model name to the batch endpoint.
- Record the returned job ID in your local log.
- Poll the status endpoint every 30 seconds until the job shows complete.
- Download the zip archive that contains numbered MP4 files.
- Run a quick script that checks each file duration and resolution.
- Upload approved clips to your asset folder and archive the raw outputs.
After the final upload your campaign folder holds 50 ready clips. You can repeat the same flow next week by swapping the CSV and keeping the same job template. Link back to Image to Video if you want to extend stills into new sequences.
Credit tracking
Track usage inside the account page. The batch of 50 clips with mixed models averaged 9.5 credits each. Set a hard stop at 500 credits so the run does not exceed budget.
Reference image handling
When using Reference to Video attach one PNG per row. Keep images under 4 MB and square aspect ratio for best results.
Output file naming
The system returns files named jobID_rowNumber.mp4. Rename them in bulk with a short Python loop that pulls the original prompt slug from your CSV.
Quality checks
Compare the first frame of each clip against the reference image using a simple pixel diff script. Any frame that drifts more than 12 percent triggers a manual review.
Next run planning
Store the successful CSV and job parameters in a template folder. Next time you only edit the prompt column and resubmit.
The batch finishes with every video approved and ready for the meeting.


