AI video generation
Create videos from text and images, track progress and download MP4 through the Videos API.
Back to documentationConnection and authentication
Base URL: https://thapi.cloud/v1
Authorization: Bearer $API_KEY
Set API_KEY in your environment. GET /v1/models checks authentication without creating a video.
read -r -s -p "API_KEY: " API_KEY
export API_KEY
printf '\n'
curl -fsS https://thapi.cloud/v1/models -H "Authorization: Bearer ${API_KEY:?API_KEY}"cURL commands use Bash; on Windows, use the PowerShell setup. Replace sample media URLs with your own provider-accessible files.
Creating a video is billable. Save the id from a successful response to track the same job.
If a job fails after an id is returned, refunds depend on provider results and reconciliation. A failed status does not confirm an immediate Credits refund.
Polling, downloading and cancellation do not create another generation. Successful cancellation does not automatically reverse a recorded charge.
Models and capabilities
| Model | Vendor | Duration (seconds) | Price / video | Reference images, max. | Aspect ratios | Resolution |
|---|---|---|---|---|---|---|
st1/veo-3.1 | 4 / 6 / 8 | 4,600 ST / 4,600 ST / 4,600 ST | 0–3 | 9:16, 16:9 | 720p / 1080p | |
st1/seedance-2.0-noface-eco | ByteDance | 4–15 seconds (1s steps) | Default 10s = 3,700 ST | 0–10 | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | original |
st1/seedance-2.0-noface | ByteDance | 4–15 seconds (1s steps) | Default 10s = 12,600 ST | 0–10 | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | original |
st1/seedance-2.0-mini | ByteDance | 4–15 seconds (1s steps) | Default 5s = 13,400 ST | 0–9 | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 720p / 1080p |
st1/seedance-2.0-fast | ByteDance | 4–15 seconds (1s steps, Fast 720p) | Default 5s = 21,300 ST | 0–9 | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 720p / 1080p |
st1/seedance-2.5-flash | ByteDance | 4–30 seconds (1s steps) | Default 5s = 18,100 ST | 0–10 | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 480p |
st1/seedance-2.5 | ByteDance | 4–30 seconds (1s steps) | Default 5s = 40,700 ST | 0–10 | 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 720p / 1080p |
st1/wan-3.0 | Alibaba | 4–15 seconds (1s steps) | 63,300 ST | 0–10 | 16:9, 9:16 | 720p |
st2/veo-3.1 | 4 / 6 / 8 | 4,600 ST / 4,600 ST / 4,600 ST | 1–3 | 16:9, 9:16 | 720p | |
st2/google-omni-flash | 5 / 10 | 11,200 ST / 11,200 ST | 1–3 | 16:9, 9:16 | 720p | |
st2/grok-imagine-video-1.5 | xAI | 6 / 10 / 15 | 13,200 ST / 22,000 ST / 33,000 ST | 1–3 | 16:9, 9:16, 1:1, 4:3, 3:4 | 720p |
st2/seedance-2.0-mini-480p | ByteDance | 4–15 seconds (1s steps) | Default 5s = 6,300 ST | 0–10 | auto / 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 480p |
st2/seedance-2.0-mini-720p | ByteDance | 4–15 seconds (1s steps) | Default 5s = 13,400 ST | 0–10 | auto / 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 720p |
st2/seedance-2.0-fast-480p | ByteDance | 4–15 seconds (1s steps, Fast 720p) | Default 5s = 9,900 ST | 0–10 | auto / 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 480p |
st2/seedance-2.0-fast-720p | ByteDance | 4–15 seconds (1s steps, Fast 720p) | Default 5s = 21,300 ST | 0–10 | auto / 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 720p |
st2/seedance-2.0-480p | ByteDance | 4–15 seconds (1s steps) | Default 5s = 12,400 ST | 0–10 | auto / 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 480p |
st2/seedance-2.0-720p | ByteDance | 4–15 seconds (1s steps) | Default 5s = 26,700 ST | 0–10 | auto / 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 720p |
st2/seedance-2.0-1080p | ByteDance | 4–15 seconds (1s steps) | Default 5s = 65,800 ST | 0–10 | auto / 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 1080p |
st2/seedance-2.5-480p | ByteDance | 4–30 seconds (1s steps) | Default 5s = 18,100 ST | 0–10 | auto / 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 480p |
st2/seedance-2.5-720p | ByteDance | 4–30 seconds (1s steps) | Default 5s = 40,700 ST | 0–10 | auto / 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 720p |
st2/seedance-2.5-1080p | ByteDance | 4–30 seconds (1s steps) | Default 5s = 99,800 ST | 0–10 | auto / 21:9, 16:9, 4:3, 1:1, 3:4, 9:16 | 1080p |
Five main Seedance models (ByteDance, st1/ line): 2.0-1080p, 2.0-720p, 2.0-fast-720p, 2.5-1080p, 2.5-720p. Billed by the exact seconds you send. Veo / Omni / Grok keep fixed duration price tables.
One image via input_reference/images is the first frame (aspect auto). Use reference_image_urls or omni_reference_task_type=reference to guide content with a fixed aspect ratio.
veo-3.1 accepts only 4, 6 or 8. google-omni-flash accepts only 5 or 10. grok-imagine-video-1.5 accepts only 6, 10 or 15. Check seconds in the response.
Endpoints and parameters
POST /v1/videos — create a job
Send application/json. This endpoint reads JSON, not multipart/form-data; use URLs or image JSON supported by the model.
| Parameter | Requirement | Usage |
|---|---|---|
model | Required | An available video model ID; set it explicitly rather than relying on a default. |
prompt | Required | Describe the subject, setting, action and camera movement. |
seconds | Optional | Follow the model table. veo-3.1 defaults to 8s; google-omni-flash to 10s; grok-imagine-video-1.5 to 6s. |
aspect_ratio | Optional | For example 16:9 or 9:16 depending on the model. Keep it consistent with size. |
size | Optional | Dimensions such as 1280x720 or 720x1280. Accepted sizes depend on the model. |
images / input_reference | Optional | Starting/reference images via URL/JSON. The entire body is limited to 2047 MB; provider image limits also apply. |
reference_image_urls | Optional | reference_image_urls: reference images (reference mode; not locked as the first frame). |
omni_reference_task_type | Optional | omni_reference_task_type: set "reference" when using reference images with a fixed aspect_ratio. |
last_frame | Optional | End frame for veo-3.1 or grok-imagine-video-1.5, with the same input_reference. |
input_video | Optional | Source MP4 URL for google-omni-flash video-to-video. |
resolution | Optional | Some models support 720p or 1080p (default 720p). Others may ignore it or derive from size. |
generate_audio | Optional | Some video models may ignore generate_audio / reference_audios. |
GET /v1/videos/{id} — track progress
Pass ?model= matching the creation model. Recommended poll interval: 10s (back off on HTTP 429).
- queued: the job was accepted and is waiting.
- in_progress: the provider is processing the job.
- completed: the result can be downloaded.
- failed: inspect error and keep the id for support.
{
"id": "video_abc123",
"object": "video",
"model": "st2/seedance-2.0-720p",
"status": "completed",
"progress": 100,
"seconds": "10",
"size": "1280x720",
"error": null
}GET /v1/videos/{id}/content — download MP4
Download only after completed. Send the same API key and ?model=; save the binary response as .mp4.
DELETE /v1/videos/{id} — request cancellation
Cancellation depends on the route and job state; some routes currently do not support DELETE. Cancellation does not guarantee a refund.
Pricing by duration
Prices follow this website’s current configuration, including applicable adjustments. Check them before creating a video.
Seedance duration pricing. Unit: VND per successful video. 4–15s or 4–30s is the supported duration range, not a flat package price. Choose seconds within the supported range; exact prices are listed below. Any fixed generation fee is already included.
st1/seedance-2.0-noface-eco
If seconds is omitted: 10s = 3,700 ST.
| Duration / Seconds | Price / video |
|---|---|
| 10s | 3,700 ST |
| 15s | 5,000 ST |
st1/seedance-2.0-noface
If seconds is omitted: 10s = 12,600 ST.
| Duration / Seconds | Price / video |
|---|---|
| 10s | 12,600 ST |
| 15s | 16,400 ST |
st1/seedance-2.0-mini
If seconds is omitted: 5s = 13,400 ST.
| Duration / Seconds | Price / video |
|---|---|
| 5s | 13,400 ST |
| 10s | 26,700 ST |
| 15s | 40,000 ST |
st1/seedance-2.0-fast
If seconds is omitted: 5s = 21,300 ST.
| Duration / Seconds | Price / video |
|---|---|
| 5s | 21,300 ST |
| 10s | 42,500 ST |
| 15s | 63,800 ST |
st1/seedance-2.5-flash
If seconds is omitted: 5s = 18,100 ST.
| Duration / Seconds | Price / video |
|---|---|
| 5s | 18,100 ST |
| 10s | 36,200 ST |
| 15s | 54,200 ST |
| 30s | 108,400 ST |
st1/seedance-2.5
If seconds is omitted: 5s = 40,700 ST.
| Duration / Seconds | Price / video |
|---|---|
| 5s | 40,700 ST |
| 10s | 81,300 ST |
| 15s | 121,800 ST |
| 30s | 243,500 ST |
st2/seedance-2.0-mini-480p
If seconds is omitted: 5s = 6,300 ST.
| Duration / Seconds | Price / video |
|---|---|
| 4s | 5,100 ST |
| 5s | 6,300 ST |
| 6s | 7,600 ST |
| 7s | 8,800 ST |
| 8s | 10,000 ST |
| 9s | 11,200 ST |
| 10s | 12,500 ST |
| 11s | 13,700 ST |
| 12s | 14,900 ST |
| 13s | 16,100 ST |
| 14s | 17,400 ST |
| 15s | 18,600 ST |
st2/seedance-2.0-mini-720p
If seconds is omitted: 5s = 13,400 ST.
| Duration / Seconds | Price / video |
|---|---|
| 4s | 10,800 ST |
| 5s | 13,400 ST |
| 6s | 16,100 ST |
| 7s | 18,700 ST |
| 8s | 21,400 ST |
| 9s | 24,100 ST |
| 10s | 26,700 ST |
| 11s | 29,400 ST |
| 12s | 32,100 ST |
| 13s | 34,700 ST |
| 14s | 37,400 ST |
| 15s | 40,000 ST |
st2/seedance-2.0-fast-480p
If seconds is omitted: 5s = 9,900 ST.
| Duration / Seconds | Price / video |
|---|---|
| 4s | 7,900 ST |
| 5s | 9,900 ST |
| 6s | 11,800 ST |
| 7s | 13,800 ST |
| 8s | 15,800 ST |
| 9s | 17,700 ST |
| 10s | 19,700 ST |
| 11s | 21,700 ST |
| 12s | 23,600 ST |
| 13s | 25,600 ST |
| 14s | 27,600 ST |
| 15s | 29,500 ST |
st2/seedance-2.0-fast-720p
If seconds is omitted: 5s = 21,300 ST.
| Duration / Seconds | Price / video |
|---|---|
| 4s | 17,000 ST |
| 5s | 21,300 ST |
| 6s | 25,500 ST |
| 7s | 29,800 ST |
| 8s | 34,000 ST |
| 9s | 38,300 ST |
| 10s | 42,500 ST |
| 11s | 46,800 ST |
| 12s | 51,000 ST |
| 13s | 55,300 ST |
| 14s | 59,500 ST |
| 15s | 63,800 ST |
st2/seedance-2.0-480p
If seconds is omitted: 5s = 12,400 ST.
| Duration / Seconds | Price / video |
|---|---|
| 4s | 9,900 ST |
| 5s | 12,400 ST |
| 6s | 14,900 ST |
| 7s | 17,300 ST |
| 8s | 19,800 ST |
| 9s | 22,300 ST |
| 10s | 24,800 ST |
| 11s | 27,200 ST |
| 12s | 29,700 ST |
| 13s | 32,200 ST |
| 14s | 34,600 ST |
| 15s | 37,100 ST |
st2/seedance-2.0-720p
If seconds is omitted: 5s = 26,700 ST.
| Duration / Seconds | Price / video |
|---|---|
| 4s | 21,400 ST |
| 5s | 26,700 ST |
| 6s | 32,000 ST |
| 7s | 37,300 ST |
| 8s | 42,600 ST |
| 9s | 47,900 ST |
| 10s | 53,200 ST |
| 11s | 58,600 ST |
| 12s | 63,900 ST |
| 13s | 69,200 ST |
| 14s | 74,500 ST |
| 15s | 79,800 ST |
st2/seedance-2.0-1080p
If seconds is omitted: 5s = 65,800 ST.
| Duration / Seconds | Price / video |
|---|---|
| 4s | 52,600 ST |
| 5s | 65,800 ST |
| 6s | 78,900 ST |
| 7s | 92,000 ST |
| 8s | 105,200 ST |
| 9s | 118,300 ST |
| 10s | 131,500 ST |
| 11s | 144,600 ST |
| 12s | 157,700 ST |
| 13s | 170,900 ST |
| 14s | 184,000 ST |
| 15s | 197,200 ST |
st2/seedance-2.5-480p
If seconds is omitted: 5s = 18,100 ST.
| Duration / Seconds | Price / video |
|---|---|
| 4s | 14,500 ST |
| 5s | 18,100 ST |
| 6s | 21,700 ST |
| 7s | 25,300 ST |
| 8s | 29,000 ST |
| 9s | 32,600 ST |
| 10s | 36,200 ST |
| 11s | 39,800 ST |
| 12s | 43,400 ST |
| 13s | 47,000 ST |
| 14s | 50,600 ST |
| 15s | 54,200 ST |
| 16s | 57,900 ST |
| 17s | 61,500 ST |
| 18s | 65,100 ST |
| 19s | 68,700 ST |
| 20s | 72,300 ST |
| 21s | 75,900 ST |
| 22s | 79,500 ST |
| 23s | 83,100 ST |
| 24s | 86,800 ST |
| 25s | 90,400 ST |
| 26s | 94,000 ST |
| 27s | 97,600 ST |
| 28s | 101,200 ST |
| 29s | 104,800 ST |
| 30s | 108,400 ST |
st2/seedance-2.5-720p
If seconds is omitted: 5s = 40,700 ST.
| Duration / Seconds | Price / video |
|---|---|
| 4s | 32,600 ST |
| 5s | 40,700 ST |
| 6s | 48,800 ST |
| 7s | 57,000 ST |
| 8s | 65,100 ST |
| 9s | 73,200 ST |
| 10s | 81,300 ST |
| 11s | 89,400 ST |
| 12s | 97,500 ST |
| 13s | 105,600 ST |
| 14s | 113,700 ST |
| 15s | 121,800 ST |
| 16s | 130,000 ST |
| 17s | 138,100 ST |
| 18s | 146,200 ST |
| 19s | 154,300 ST |
| 20s | 162,400 ST |
| 21s | 170,500 ST |
| 22s | 178,600 ST |
| 23s | 186,700 ST |
| 24s | 194,800 ST |
| 25s | 202,900 ST |
| 26s | 211,100 ST |
| 27s | 219,200 ST |
| 28s | 227,300 ST |
| 29s | 235,400 ST |
| 30s | 243,500 ST |
st2/seedance-2.5-1080p
If seconds is omitted: 5s = 99,800 ST.
| Duration / Seconds | Price / video |
|---|---|
| 4s | 79,900 ST |
| 5s | 99,800 ST |
| 6s | 119,800 ST |
| 7s | 139,700 ST |
| 8s | 159,700 ST |
| 9s | 179,600 ST |
| 10s | 199,600 ST |
| 11s | 219,600 ST |
| 12s | 239,500 ST |
| 13s | 259,500 ST |
| 14s | 279,400 ST |
| 15s | 299,400 ST |
| 16s | 319,300 ST |
| 17s | 339,300 ST |
| 18s | 359,200 ST |
| 19s | 379,200 ST |
| 20s | 399,200 ST |
| 21s | 419,100 ST |
| 22s | 439,100 ST |
| 23s | 459,000 ST |
| 24s | 479,000 ST |
| 25s | 498,900 ST |
| 26s | 518,900 ST |
| 27s | 538,800 ST |
| 28s | 558,800 ST |
| 29s | 578,800 ST |
| 30s | 598,700 ST |
Other video models
| Model | Duration (seconds) | Price / video |
|---|---|---|
st1/veo-3.1 | 4 | 4,600 ST |
st1/veo-3.1 | 6 | 4,600 ST |
st1/veo-3.1 | 8 | 4,600 ST |
st1/wan-3.0 | 5 | 63,300 ST |
st2/veo-3.1 | 4 | 4,600 ST |
st2/veo-3.1 | 6 | 4,600 ST |
st2/veo-3.1 | 8 | 4,600 ST |
st2/google-omni-flash | 5 | 11,200 ST |
st2/google-omni-flash | 10 | 11,200 ST |
st2/grok-imagine-video-1.5 | 6 | 13,200 ST |
st2/grok-imagine-video-1.5 | 10 | 22,000 ST |
st2/grok-imagine-video-1.5 | 15 | 33,000 ST |
Seedance bills by the seconds you send. Veo / Omni / Grok keep fixed duration price tables.
View all pricingIntegration examples
Each POST creates a billable video. Choose one example; example.com media URLs are placeholders and must be replaced.
import os
import time
from getpass import getpass
from urllib.parse import quote
import requests
from requests.adapters import HTTPAdapter
api_key = os.getenv("STALI_API_KEY") or getpass("STALI_API_KEY: ")
headers = {"Authorization": f"Bearer {api_key}"}
model = "st2/seedance-2.0-720p"
http = requests.Session()
http.mount("https://", HTTPAdapter(max_retries=0))
created = http.post("https://thapi.cloud/v1/videos", headers=headers, json={
"model": model, "prompt": "Cinematic sunset over ocean waves",
"seconds": 5, "aspect_ratio": "16:9",
}, timeout=(10, 120))
print("Request ID:", created.headers.get("x-request-id") or created.headers.get("x-stali-request-id", ""), flush=True)
created.raise_for_status()
video = created.json()
video_id = video["id"]
with open("video-job.txt", "w") as f:
f.write(f"{video_id}\t{model}\n")
print(video_id, video.get("status"), "(da luu vao video-job.txt)", flush=True)
job_url = "https://thapi.cloud/v1/videos/" + quote(video_id, safe="")
han_chot = time.monotonic() + 1800
cho = 5
while video.get("status") not in ("completed", "failed"):
if time.monotonic() > han_chot:
raise SystemExit(
f"Het thoi gian cho phia client. Tac vu CO THE VAN DANG CHAY.\n"
f"Tiep tuc bang: python resume.py {video_id} {model}\n"
f"Dung tao video moi — lenh POST da tinh phi roi."
)
time.sleep(cho)
progress = http.get(job_url, headers=headers, params={"model": model}, timeout=(10, 60))
if progress.status_code in (429, 500, 502, 503, 504):
cho = min(cho * 2, 60)
sau = progress.headers.get("retry-after")
if sau and sau.isdigit():
cho = max(cho, int(sau))
print(video_id, f"upstream {progress.status_code}, cho {cho}s roi thu lai", flush=True)
continue
progress.raise_for_status()
cho = 5
video = progress.json()
print(video_id, video.get("status"), flush=True)
if video.get("status") != "completed":
raise RuntimeError(str(video))
content = http.get(job_url + "/content", headers=headers, params={"model": model}, stream=True, timeout=(10, 120))
content.raise_for_status()
tam = f"{video_id}.mp4.part"
with open(tam, "wb") as output:
for chunk in content.iter_content(chunk_size=65536):
if chunk:
output.write(chunk)
os.replace(tam, f"{video_id}.mp4")
print("da luu", f"{video_id}.mp4", flush=True)Error handling
| HTTP | Cause | Action |
|---|---|---|
| 400 | Invalid parameters or unsupported cancellation. | Check JSON, seconds, images and model support. |
| 401 | Missing or invalid key. | Check authentication headers and active key. |
| 402 | HTTP 402: check error.type, remaining Credits, key spend limit, or outstanding balance from prior requests. | Inspect error.type: insufficient_balance → check remaining Credits; api_key_monthly_limit → adjust key limit in Dashboard → Keys; outstanding_undercharge → reconcile prior call balance. See /docs/reference/errors. |
| 403 | Request is not permitted. | Check key permissions, model and content policy. |
| 404 | Model or job not found on this route. | Use the original id, key and ?model=. |
| 409 | Job is not ready for this operation. | Keep polling; download after completed. |
| 413 | Request body exceeds the limit. | Reduce body size; use URLs instead of large embedded media. |
| 429 | Rate or concurrency limit exceeded. | Back off and reduce concurrent jobs. |
| 502 | Provider route response error. | Keep the request ID; do not auto-repeat POST. |
Do not automatically repeat POST after a timeout or network error: the first request may have been accepted. If you have an id, poll it; otherwise keep the request ID and check Usage or contact support before recreating.
Prompt design
These are creative guidelines, not a guarantee that a provider will reproduce every detail. Each model’s content policy still applies.
Write a clear prompt
- Define subject, setting and main action before effects.
- Set duration with seconds, not only in the prompt.
- Keep left/right positions and outfits consistent across shots.
- Prefer one clear camera movement per shot.
- Describe light sources, colors and materials.
- Avoid small text, logos or exact numbers in frame.
- Start with one short scene; change one factor at a time after reviewing.
Arrange reference images
- Number Image 1, Image 2… in submission order.
- State which image controls character, outfit or setting.
- Use authorized, clear images with a consistent visual direction.
- Match characters and composition in first/last frames for natural motion.
- Stay within the model’s image limit; references do not guarantee exact reproduction.
Prompt template
Generate immediately in 16:9 widescreen as one continuous three-shot sequence.
The reference images are colored-pencil character design sketches: use them only for design and outfits. Render the video as a photoreal 3D CG game cinematic with dramatic lighting.
Image 1 = PROTAGONIST: [character design].
Image 2 = ANTAGONIST: [opponent design].
Image 3 = ENVIRONMENT: [setting].
FIXED LAYOUT: altar in the background CENTER; protagonist on the LEFT; antagonist on the RIGHT. Nobody disappears, teleports or swaps sides.
LIGHTING: torchlight from the left wall, cool moonlight from the ceiling.
Action: well-choreographed, orbiting camera. Sparks and dark smoke on impact only; no blood, no wounds, no gore.
Sound: heavy impacts, wind, no dialogue.
Shot 1: camera pushes in, protagonist draws a weapon, antagonist raises claws.
Shot 2: fast exchange, camera orbits smoothly around both fighters.
Shot 3: climax, both stay on their sides, protagonist lands in a ready stance.
Keep faces and outfits consistent. No text, no numbers, no subtitles, no watermark.The template guides the scene. Shorten it if actions are missed; do not use prose instead of API parameters.
Describe non-graphic action
| Avoid graphic detail | Safer visual direction |
|---|---|
| blood, wound, gore, corpse | sparks, black smoke, torn fabric only |
| Pool of blood | murky grey mist, dark viscous puddle |
| Injury-causing attack | glowing wisps of spirit-light, shadowy aura |
| Cut on skin | tearing only the fabric of the sleeve, no blood |
Build a sequence
- Split the story into scenes with clear starts and ends.
- Reuse character descriptions, lighting and references.
- Download and review each scene before generating the next.
- Join scenes in an editor; each POST remains a separate billable job.
When results miss the mark
- Missing actions: reduce events in one scene.
- Swapped positions: specify left/right and stable composition.
- Inconsistency: reuse references and identifying details.
- Wrong duration: check seconds and fixed-duration models.
- Rejected: review error and content policy; do not repeatedly resend the same request.
Review motion with a frame grid
ffmpeg -i clip.mp4 -vf "fps=1,scale=320:-1,tile=6x5" -frames:v 1 frame_grid.pngThis ffmpeg command reads local clip.mp4 and creates a frame grid without calling the API. Install ffmpeg first.
Preflight checklist
- Choose the correct model ID and supported duration.
- Check pricing and balance before creating.
- Keep keys server-side, out of public browser code.
- Use JSON and provider-accessible media URLs.
- Save id, model and request ID for tracking.
- Poll the same id with ?model= and back off when limited.
- Download after completed and verify the MP4 file.
- Do not recreate automatically when acceptance is uncertain.
- Review errors and costs in Usage; send the id to support if needed.