API docs
One base URL and one key for every model. Requests are asynchronous: you create a task, then poll it or wait for a callback.
Quickstart
Create an API key in the console, then run this request. It starts one 5-second 720p clip with Seedance 2.0 Fast and costs $0.34. Your free credit covers it.
curl -X POST https://api.letsfliq.com/api/v3/contents/generations/tasks \ -H "Authorization: Bearer $FLIQ_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "dreamina-seedance-2-0-fast-260128", "content": [ { "type": "text", "text": "A wooden match strikes and bursts into flame in slow motion, sparks flying, then settles into a calm flame" } ], "resolution": "720p", "ratio": "16:9", "duration": 5 }'
Authentication
Send your key as a bearer token. One key works for every model.
https://api.letsfliq.com/api/v3
-H "Authorization: Bearer $FLIQ_API_KEY"Coming from the official API? Replace the base URL https://ark.ap-southeast.bytepluses.com/api/v3 with https://api.letsfliq.com/api/v3 and use your fliq key. Model IDs and request fields stay the same.
Create a video task
POST /contents/generations/tasks returns a task ID straight away. Each model page has an API tab with the request for the setting you chose in its playground.
modelstring- Model ID, same as the official one, for example
dreamina-seedance-2-0-fast-260128 contentarray- Text prompt, plus first and last frame images or reference images, video and audio, depending on the model. BytePlus: “Recommended prompt length: no more than 500 Chinese characters or 1,000 English words. Lengthy text will lead to scattered information, and the model may ignore details and only focus on key points.”
resolutionstring480pto4K, depending on the modelratiostring- 21:9, 16:9, 4:3, 1:1, 3:4, 9:16. First and last frame: adaptive
durationinteger- Seconds: 4 to 30 on Seedance 2.5, Seedance 2.5 (Draft), Seedance 2.5 Flash; 4 to 15 on Seedance 2.0, Seedance 2.0 Fast, Seedance 2.0 Mini. -1 lets the model choose the length: 4 to 30 s on Seedance 2.5, 4 to 15 s on the 2.0 series. On Seedance 2.5 Flash, -1 makes a 5-second clip.
generate_audioboolean- Sound in the output video. On by default;
falsemakes a silent video callback_urlstring- We POST the task here as its status changes, and always at its final status
Seedance 2.5 Flash's upstream does not take duration -1, so fliq makes a 5-second clip in its place, and video edit is not available on Flash.
Get the result
Poll the task until its status is final. Status moves from queued to running, then to succeeded or failed. A task you cancel reads cancelled, and one that runs past its deadline reads expired.
curl https://api.letsfliq.com/api/v3/contents/generations/tasks/task_8f2c41d09a7b \ -H "Authorization: Bearer $FLIQ_API_KEY"
{
"id": "task_8f2c41d09a7b",
"model": "dreamina-seedance-2-0-fast-260128",
"status": "succeeded",
"error": null,
"content": {
"video_url": "https://files.letsfliq.com/task_8f2c41d09a7b.mp4",
"last_frame_url": "https://files.letsfliq.com/task_8f2c41d09a7b.jpg"
},
"usage": {
"completion_tokens": 50220,
"total_tokens": 50220
},
"created_at": 1795072400,
"updated_at": 1795072442,
"seed": 2187,
"resolution": "720p",
"ratio": "16:9",
"duration": 5,
"framespersecond": 24,
"generate_audio": true,
"draft": false,
"service_tier": "default",
"execution_expires_after": 172800,
"priority": 0,
"output_format": "mp4",
"safety_identifier": "user-1234"
}Or pass callback_url when you create the task. We check each task every few seconds and POST the same body to it for each status we see: queued and running, which a task that moves quickly can pass before we see them, then always its final status. The final status is tried up to four times over about six minutes, until your endpoint answers 2xx.
Generate images
POST /images/generations with model, prompt and size (a preset such as 2K, or width x height near a preset at one of the model's ratios, such as 2816x1584, which comes back at that ratio's standard size). Pass reference image URLs in image. BytePlus: “Prompt length recommendation: Use no more than 300 Chinese characters or 600 English words. Excessively long prompts may scatter information, causing the model to overlook details and focus only on major elements.”
curl -X POST https://api.letsfliq.com/api/v3/images/generations \ -H "Authorization: Bearer $FLIQ_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "dola-seedream-5-5-261028", "prompt": "a sheet of bone-white silk, warm rim light", "size": "2K"}'
Errors
An error answers with its HTTP status and {"error": {"code", "message", "param", "type"}}, the same body as the official API's.
| Status | Code | What happened and what to do |
|---|---|---|
| 400 | MissingParameter | A required field is missing: model, or prompt on an image. Add it. |
| 400 | InvalidParameter | A value the model does not accept, or empty content. param names the field. |
| 400 | InvalidParameter.UnsupportedParameter | A field we do not take, or a fixed field at another value. Remove it. |
| 400 | SensitiveContentDetected | The content filter blocked the request. Change the prompt or the images. |
| 401 | AuthenticationError | The key is missing, wrong or switched off. |
| 403 | AccountOverdueError | Your balance does not cover this request. Top up in the console. |
| 403 | OperationDenied.InvalidState | The request clashes with one still in progress: the same Idempotency-Key, or an input file another task uses. Retry once that one is done. |
| 403 | AccessDenied | This key may not make this request. |
| 404 | InvalidEndpointOrModel.NotFound | The model ID is not one we serve. See Models. |
| 404 | ResourceNotFound | No task with this ID on your account. |
| 409 | InvalidAction.RunningTaskDeletion | A running task cannot be deleted. It runs to its end; delete it after that. |
| 429 | QuotaExceeded | What is left of the key's spend cap for its period cannot cover this request. Raise the cap in the console. |
| 429 | AccountRateLimitExceeded | Too many requests. Slow down, then retry. |
| 429 | ServerOverloaded | We are busy. Retry in a few seconds. |
| 500 | InternalServiceError | Something failed on our side. Retry; if it keeps failing, contact support. |
A task can also end as failed, for example when the content filter blocks the prompt. The task carries the reason, and failed tasks cost $0.
Limits and queueing
Your account runs up to 9,999 generations at once from the API, and up to 10 from the playground and model pages. Over the limit, a generation is never rejected: it is created, reads queued, and starts when one of your earlier generations ends, in the order you created them.
While it waits, its cost is held from your balance, and a generation that never starts costs nothing. Cancel a queued generation, or let it pass its deadline, and the hold comes back to you.
Result files
- Files are kept for 7 days, so download the file to your own storage.
- Usage records (task ID, settings, cost) stay after the file is deleted. See them under Usage in the console.
- In Usage, Expired means the files are no longer kept; a task that ran past its deadline is listed as Failed.