How to Use PixVerse V6 API
A step-by-step PixVerse V6 API tutorial with Python, Node.js and cURL: submit a text to video job, poll it or receive a webhook, and download the video. The example below costs $0.13.
- Endpoints
- 3
- Text to Video · Image to Video · Reference to Video
- Example request
- $0.13
- Text to Video
- Languages
- 3
- Python · Node.js · cURL
- Failed runs
- $0
- refunded automatically
Get an API key
Create an account, add credits (from $10) and create a key in Dashboard → API keys. Store it as CHEAPERGEN_API_KEY on your server. Every request sends it as a bearer token.
Choose a PixVerse V6 endpoint
Each task has its own endpoint. All of them take a JSON body and return a generation you can poll.
| Task | Endpoint | Required | From |
|---|---|---|---|
| Text to Video | pixverse/pixverse-v6/text-to-video | prompt | $0.0176/s |
| Image to Video | pixverse/pixverse-v6/image-to-video | prompt, image_url | $0.0176/s |
| Reference to Video | pixverse/pixverse-v6/reference-to-video | prompt, reference_image_urls | $0.0176/s |
Submit a text to video job
This program submits the job, polls every 3 seconds until it finishes and prints the video URL. Swap the prompt and settings for your own.
import os, time, requests
API = "https://cheapergen.com/api/v1"
headers = {"Authorization": f"Bearer {os.environ['CHEAPERGEN_API_KEY']}"}
# 1. Submit the job
job = requests.post(f"{API}/run/pixverse/pixverse-v6/text-to-video", headers=headers, json={
"prompt": "A cute clay-animation fox bakes a pie in a tiny kitchen, stop-motion style, warm light",
"aspect_ratio": "16:9",
"resolution": "540p",
"duration": 5
}).json()
# 2. Poll until it finishes (or pass "webhook_url" and skip polling)
while job["status"] in ("queued", "running"):
time.sleep(3)
job = requests.get(f"{API}/generations/{job['id']}", headers=headers).json()
print(job["status"], job["output"]["video"]["url"] if job["status"] == "succeeded" else job["error"])Set the parameters that matter
The settings for pixverse/pixverse-v6/text-to-video, with what each one does to the price.
| Parameter | Type · default | What it does | Price effect |
|---|---|---|---|
| aspect_ratio | string (enum) · 16:9 | Output frame shape. 16:9 · 9:16 · 1:1 · 4:3 · 3:4 · 3:2 · 2:3 · 21:9 | Yes |
| resolution | string (enum) · 540p | Output resolution. Higher resolutions cost more per second. 360p · 540p · 720p · 1080p | 360p: $0.0176/s 540p: $0.0264/s 720p: $0.0352/s 1080p: $0.0704/s |
| duration | integer · 5 | Length of the generated clip in seconds (1–15s). You pay per second. | Billed per second |
| generate_audio | boolean · false | Generate synchronized sound, ambience and dialogue. Clips with audio are billed at a higher per-second rate. | Yes |
| negative_prompt | string | Things to avoid in the output. | None |
| seed | integer | Use the same seed and settings to reproduce a result. Leave empty for random. | None |
Other PixVerse V6 endpoints take the same shape with their own inputs:
POST /api/v1/run/pixverse/pixverse-v6/image-to-video
{
"prompt": "The portrait comes alive: she blinks, smiles and her hair moves in the breeze",
"image_url": "https://cdn.cheapergen.com/samples/portrait.jpg",
"resolution": "540p",
"duration": 5
}POST /api/v1/run/pixverse/pixverse-v6/reference-to-video
{
"prompt": "The character from @Image1 skateboards past the mural in @Image2, dynamic tracking shot",
"reference_image_urls": [
"https://cdn.cheapergen.com/samples/reference-1.jpg",
"https://cdn.cheapergen.com/samples/reference-2.jpg"
],
"aspect_ratio": "16:9",
"resolution": "540p",
"duration": 5
}Get the result
A job moves from queued to running to succeeded, failed or canceled. Poll GET /api/v1/generations/{id}, or pass webhook_url and we POST the result to you. Download the output and store it yourself.
{
"id": "gen_8c2QmX1nq0k4",
"object": "generation",
"model": "pixverse/pixverse-v6",
"endpoint": "pixverse/pixverse-v6/text-to-video",
"mode": "text-to-video",
"status": "succeeded",
"input": {
"prompt": "A cute clay-animation fox bakes a pie in a tiny kitchen, stop-motion style, warm light",
"aspect_ratio": "16:9",
"resolution": "540p",
"duration": 5
},
"output": {
"video": {
"url": "https://cdn.cheapergen.com/outputs/gen_8c2Q.mp4",
"content_type": "video/mp4",
"duration": 5,
"width": 1280,
"height": 720
}
},
"error": null,
"cost": {
"amount_usd": 0.2255,
"currency": "usd",
"estimated": false,
"official_usd": 0.264,
"saved_usd": 0.0385
},
"source": "api",
"created_at": "2026-10-15T09:21:04Z",
"started_at": "2026-10-15T09:21:06Z",
"completed_at": "2026-10-15T09:22:31Z"
}Price a request before you run it
The quote endpoint is free and needs no key. It returns the price, the official price and your discount for exactly the input you send.
curl -X POST https://cheapergen.com/api/v1/quote/pixverse/pixverse-v6/text-to-video \
-H "Content-Type: application/json" \
-d '{"prompt":"A cute clay-animation fox bakes a pie in a tiny kitchen, stop-motion style, warm light","aspect_ratio":"16:9","resolution":"540p","duration":5}'| Status | Code | Meaning |
|---|---|---|
| 400 | invalid_request | A parameter is missing or out of range — the message names it. |
| 401 | unauthorized | Missing, malformed or revoked API key. |
| 402 | insufficient_balance | Not enough credits for the quoted price; top up or enable auto top-up. |
| 429 | rate_limited | Too many requests or generations in progress; back off and retry. |
| 502 | upstream_error | The model provider failed; the hold is refunded and you can retry. |
| 503 | model_unavailable | No healthy route right now; retry later or pick another model. |
FAQ
