Getting started
Quickstart
Create an API key, add credits and generate your first AI video with JavaScript, Python or cURL in under two minutes.
This guide takes you from zero to a finished video with Seedance 2.0 Fast. The same steps work for every model — only the endpoint and input fields change.
Using a coding agent?
Paste this into Claude Code, Cursor, Codex or any coding agent. It adds the API to your project, keeps the key in CHEAPERGEN_API_KEY and tests with a free quote before anything is spent.
Add Seedance 2.0 Fast (CheaperGen endpoint bytedance/ seedance-2.0-fast/ text-to-video) to this project by following https:/ / cheapergen.com/ agents/ integrate.mdCreate an account and an API key
Sign in with Google or email, then open Dashboard → API keys and create a key. It looks like
cg_live_…and is shown only once — copy it somewhere safe.Add credits
CheaperGen is prepaid. Add credits in Dashboard → Billing. The example below costs $0.45 — $0.605 at the official price. Failed generations are refunded automatically. See Billing & credits.
Set your API key
Keep the key out of your code. Every example in these docs reads it from an environment variable:
export CHEAPERGEN_API_KEY="cg_live_..."Submit a generation
Send the model's inputs to
POST /api/v1/run/bytedance/seedance-2.0-fast/text-to-video. The scripts below submit the job, poll until it finishes and print the video URL.const API = "https://cheapergen.com/api/v1"; const headers = { Authorization: `Bearer ${process.env.CHEAPERGEN_API_KEY}`, "Content-Type": "application/json", }; // 1. Submit the job let job = await fetch(`${API}/run/bytedance/seedance-2.0-fast/text-to-video`, { method: "POST", headers, body: JSON.stringify({ "prompt": "A slow dolly-in on a ceramicist shaping a vase at golden hour, dust in the light, shallow depth of field", "aspect_ratio": "16:9", "resolution": "720p", "duration": 5 }), }).then((r) => r.json()); // 2. Poll until it finishes (or pass webhook_url and skip polling) while (job.status === "queued" || job.status === "running") { await new Promise((r) => setTimeout(r, 3000)); job = await fetch(`${API}/generations/${job.id}`, { headers }).then((r) => r.json()); } console.log(job.status === "succeeded" ? job.output.video.url : job.error);The API answers immediately with 202 Accepted and a generation in the
queuedstate. The price shown incost.amount_usdis held from your balance while the job runs.202 Accepted{ "id": "gen_8c2QmX1nq0k4Lw7Z", "object": "generation", "model": "bytedance/seedance-2.0-fast", "endpoint": "bytedance/seedance-2.0-fast/text-to-video", "mode": "text-to-video", "status": "queued", "input": { "prompt": "A slow dolly-in on a ceramicist shaping a vase at golden hour, dust in the light, shallow depth of field", "aspect_ratio": "16:9", "resolution": "720p", "duration": 5, "generate_audio": true }, "output": null, "error": null, "cost": { "amount_usd": 0.4494, "currency": "usd", "estimated": true }, "source": "api", "created_at": "2026-10-15T09:21:04.512Z", "started_at": null, "completed_at": null, "retention": "1d", "expires_at": null, "purged_at": null, "urls": { "get": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4Lw7Z", "cancel": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4Lw7Z/cancel" } }Get the result
Poll the generation until
statusissucceededorfailed. Video jobs usually take one to a few minutes; images take seconds.curl https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4Lw7Z \ -H "Authorization: Bearer $CHEAPERGEN_API_KEY"200 OK{ "id": "gen_8c2QmX1nq0k4Lw7Z", "object": "generation", "model": "bytedance/seedance-2.0-fast", "endpoint": "bytedance/seedance-2.0-fast/text-to-video", "mode": "text-to-video", "status": "succeeded", "input": { "prompt": "A slow dolly-in on a ceramicist shaping a vase at golden hour, dust in the light, shallow depth of field", "aspect_ratio": "16:9", "resolution": "720p", "duration": 5, "generate_audio": true }, "output": { "video": { "url": "https://cdn.cheapergen.com/outputs/gen_8c2QmX1nq0k4Lw7Z.mp4", "content_type": "video/mp4" } }, "error": null, "cost": { "amount_usd": 0.4494, "currency": "usd", "estimated": false }, "source": "api", "created_at": "2026-10-15T09:21:04.512Z", "started_at": "2026-10-15T09:21:09.031Z", "completed_at": "2026-10-15T09:22:31.870Z", "retention": "1d", "expires_at": "2026-10-16T09:22:31.870Z", "purged_at": null }Skip polling with webhooks
Add"webhook_url": "https://your-app.com/hooks/cheapergen"to the request body and we'll POST the finished generation to you. See Webhooks.
Next steps#
- Understand the generation lifecycle — statuses, polling intervals, cancellation and outputs.
- Pick a model — every endpoint ID with its price per second or per image.
- Handle errors — which responses to retry and which to fix.
- Seedance 2.0 Fast API reference — every input field, its type and default.
Something unclear or missing? Email support@cheapergen.com — we read everything.