Skip to content

Documentation

One endpoint, one job.

Send a prompt, get a job id, collect an MP4. Everything here is plain HTTPS and JSON, so any language with an HTTP client works. The base URL is https://api.llms.sale.

Quickstart

Create a key in the dashboard, export it as VIDEO_API_KEY, and run one of these. New accounts start with 500 trial credits once the email is verified, which covers one short clip on the cheaper tiers.

curl https://api.llms.sale/v1/videos \
  -H "Authorization: Bearer $VIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2.5",
    "resolution": "720p",
    "duration_seconds": 8,
    "aspect_ratio": "16:9",
    "prompt": "Aerial shot over forested ridgelines at sunrise, fog filling the valley",
    "webhook_url": "https://example.com/hooks/video"
  }'

The create call answers 202 straight away with the job. Generation takes from under a minute to a few minutes depending on the tier and length.

202 · POST /v1/videos
{
  "id": "vid_01JEQ4M8Z2T7K9XN3B5VHD6RCW",
  "object": "video.job",
  "status": "queued",
  "model": "seedance-2.5",
  "resolution": "720p",
  "duration_seconds": 8,
  "credits_held": 1520,
  "credits_charged": 0,
  "result": null,
  "error": null
}

Authentication

Send your key as a Bearer token on every request: Authorization: Bearer sk_live_…. Keys are shown once when you create them and stored only as a keyed hash, so a lost key cannot be recovered: revoke it and create another. Call the API from a server. A key shipped in a browser or mobile app can be copied by anyone.

GET /v1/models is public. Every other endpoint needs a key and answers 401 invalid_api_key without one.

Models and prices

Prices are per second of generated video, in credits. 1,000 credits are always $1.00. This table is read from the live price book, the same one GET /v1/models and the quote endpoint use.

Model idResolutionCredits / sUSD / sNotes
seedance-2.5480p88$0.088Native resolution
seedance-2.5720p190$0.19Native resolution
seedance-2.51080p460$0.46Native resolution
seedance-2.5-flash480p65$0.065Native resolution
seedance-2.5-flash720p140$0.140Native resolution
seedance-2.5-upscaled-1080p1080p150$0.15Generated at 480p, AI-upscaled. Not native.

If you leave out resolution, native models default to 720p and the upscaled model is always 1080p. Price changes are announced at least 7 days ahead and never apply to jobs already created.

Create a video

POST /v1/videos takes a JSON body. Only model, duration_seconds and prompt are required.

FieldTypeDescription
modelstringOne of the model ids above.
resolutionstring480p, 720p or 1080p, where the model offers it.
duration_secondsinteger4 to 30. You are billed for exactly this many seconds.
aspect_ratiostring16:9, 9:16, 1:1, 4:3, 3:4, 21:9. Default 16:9.
audiobooleanGenerate sound with the video. Default true. Same price either way.
promptstringWhat to generate, up to 4,000 characters.
image_urlstringOptional first frame. See image inputs.
reference_image_urlsstring[]Optional, up to 8 reference images.
consent_attestedbooleanMust be true when any image is sent.
webhook_urlstringOptional https URL to notify when the job settles.
idempotency_keystringOptional. Makes a retry return the first job instead of creating a second.

Unknown fields are rejected with 422 validation_error rather than ignored, so a typo in a field name never turns into a silently different video. Reference video input is not available yet.

Get the result

Poll GET /v1/videos/{id} every few seconds, or use a webhook and skip polling. The job moves through these states. progress is a coarse percentage tied to the state, not a frame count.

StatusProgressMeaning
queued0Accepted. The price is held.
moderating5The prompt and any input images are being checked.
submitted15Sent to a supplier.
running45The supplier is generating.
upscaling75Upscaled tier only: the 480p result is being enlarged to 1080p.
mirroring92The file is being copied to our storage.
succeeded100Done. The hold became a charge and result.url is set.
failed100Did not finish. The hold was released: cost 0. See error.
canceled100You canceled it. The hold was released: cost 0.
200 · GET /v1/videos/{id}
{
  "id": "vid_01JEQ4M8Z2T7K9XN3B5VHD6RCW",
  "object": "video.job",
  "status": "succeeded",
  "progress": 100,
  "model": "seedance-2.5",
  "resolution": "720p",
  "duration_seconds": 8,
  "aspect_ratio": "16:9",
  "audio": true,
  "credits_held": 0,
  "credits_charged": 1520,
  "cost_usd": 1.52,
  "result": {
    "url": "https://media.llms.cheap/v/…/vid_01JEQ4M8….mp4?X-Amz-Signature=…",
    "expires_at": "2026-12-05T09:41:07.000Z",
    "width": 1280,
    "height": 720,
    "duration_seconds": 8,
    "has_audio": true
  },
  "error": null,
  "created_at": "2026-12-04T09:39:52.000Z",
  "completed_at": "2026-12-04T09:41:07.000Z"
}

result.url is a signed link that works for 24 hours. Reading the job again returns a fresh link for as long as the file exists. Files are deleted 7 days after the job completes, after which result.url is null and result.expired is true. Download what you want to keep.

To stop a job that has not finished, call POST /v1/videos/{id}/cancel. The hold is released and the job costs nothing.

Webhooks

Pass webhook_url with a request, or set a default endpoint in the dashboard. When the job settles we POST a video.succeeded or video.failed event to it. The URL must be public https.

POST your endpoint
{
  "id": "evt_01JEQ4QH3N8V5R2M7XKD9T6BCY",
  "type": "video.succeeded",
  "created_at": "2026-12-04T09:41:07.000Z",
  "data": {
    "id": "vid_01JEQ4M8Z2T7K9XN3B5VHD6RCW",
    "status": "succeeded",
    "credits_charged": 1520,
    "result": { "url": "https://…", "width": 1280, "height": 720 }
  }
}

Each delivery carries an X-Signature header of the form t=timestamp,v1=signature, where the signature is HMAC-SHA256 of {timestamp}.{raw body} using your signing secret from the dashboard. Verify it against the raw bytes before parsing, and reject timestamps older than five minutes.

import { createHmac, timingSafeEqual } from "node:crypto";

// rawBody must be the exact bytes we sent, before any JSON parsing.
export function verify(rawBody: string, header: string, secret: string, toleranceSeconds = 300) {
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const timestamp = Number(parts.t);
  if (!timestamp || Math.abs(Date.now() / 1000 - timestamp) > toleranceSeconds) return false;

  const expected = createHmac("sha256", secret).update(`${timestamp}.${rawBody}`).digest("hex");
  const a = Buffer.from(expected);
  const b = Buffer.from(String(parts.v1));
  return a.length === b.length && timingSafeEqual(a, b);
}
  • Answer with any 2xx within 10 seconds. Do slow work after you respond.
  • Anything else is retried with growing delays for 24 hours, then marked failed.
  • A delivery can arrive more than once. The event id and the X-Webhook-Id header stay the same across retries: use one of them to deduplicate.
  • Redirects are not followed.

Image inputs

Start from a first frame with image_url, guide the look with up to 8 reference_image_urls, or both. Each must be a public https link to a JPEG, PNG or WebP of at most 10 MB. We fetch the image ourselves, so links that need cookies or sit on a private network will fail.

Any request with images must include "consent_attested": true. By sending it you confirm that every real person shown has agreed to this use. Without it the request is refused with 422 consent_required.

First frame, a reference and an idempotency key
curl https://api.llms.sale/v1/videos \
  -H "Authorization: Bearer $VIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "seedance-2.5",
    "resolution": "1080p",
    "duration_seconds": 6,
    "prompt": "The camera pushes in as she turns toward the window",
    "image_url": "https://example.com/first-frame.jpg",
    "reference_image_urls": ["https://example.com/character-sheet.png"],
    "consent_attested": true,
    "idempotency_key": "order-8841-shot-3"
  }'

Upscaled 1080p

seedance-2.5-upscaled-1080p is a cheaper way to get a 1080p file. It generates with Seedance 2.5 at 480p and enlarges the result to 1080p with an AI upscaler. It is not native 1080p. Fine detail, small text and faces at a distance will be softer than the native tier. It suits social feeds, ad variants and previews. For a hero shot, use seedance-2.5 at 1080p.

Every response for this model carries "upscaled_from": "480p", so the label travels with the file through your own pipeline.

The label is in the response
{
  "id": "vid_01JEQ5A1C8P4M2YH7T9KZ3WQXD",
  "status": "succeeded",
  "model": "seedance-2.5-upscaled-1080p",
  "resolution": "1080p",
  "upscaled_from": "480p",
  "duration_seconds": 10,
  "credits_charged": 1500,
  "cost_usd": 1.5,
  "result": { "width": 1920, "height": 1080, "url": "https://…" }
}

Quotes and billing

POST /v1/videos/quote prices a request without creating it. The price is always credits per second times duration_seconds.

Price a request
curl https://api.llms.sale/v1/videos/quote \
  -H "Authorization: Bearer $VIDEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "seedance-2.5", "resolution": "1080p", "duration_seconds": 10 }'
  • Hold. Creating a job reserves the quoted credits. If the balance is short the request fails with 402 insufficient_credits and nothing is held.
  • Charge. On success the hold becomes a charge of exactly the quoted amount.
  • Release. On failure, cancellation or a content block the hold is returned in full.

GET /v1/balance returns spendable credits and the credits currently held. Buy credits in the dashboard; packs and rates are on the pricing page.

Idempotency

Networks fail in the middle of requests. Send an idempotency_key in the body, or an Idempotency-Key header, with every create call. If the same key arrives again with the same body, you get the original job back with an Idempotent-Replayed: true header and no second hold. The same key with a different body is refused with 409 idempotency_conflict. Keys are scoped to your account.

Errors

Errors use ordinary HTTP status codes and one JSON shape. Branch on error.code; the message is written for people and may change.

402 · insufficient_credits
{
  "error": {
    "code": "insufficient_credits",
    "type": "billing_error",
    "message": "This request costs 4600 credits ($4.60) and the balance is 1250 credits. Add credits and try again.",
    "details": { "required_credits": 4600, "balance_credits": 1250 }
  }
}
HTTPCodeWhat it means
400validation_errorThe request body is not valid JSON.
401invalid_api_keyThe key is missing, malformed or revoked.
402insufficient_creditsThe balance cannot cover the quoted price. Nothing was held.
403account_suspendedThe account or key is suspended, for example during a payment dispute.
404not_foundNo job with that id on this account.
409idempotency_conflictThe idempotency key was already used with a different body.
409not_cancelableThe job already finished.
422validation_errorA field is missing or out of range. The message names it.
422consent_requiredInput images were sent without "consent_attested": true.
429rate_limitedToo many requests. Wait for the Retry-After seconds.
429concurrency_limitToo many jobs in progress on this key. Wait for one to finish.
451content_blockedThe request breaks the content rules. Nothing was held.
503capacity_unavailableNo supplier can serve this tier right now. Nothing was held. Retry shortly.
500internal_errorOur fault. Safe to retry with the same idempotency key.

A job that was accepted and later fails does not return an HTTP error. It ends with status: "failed" and an error object whose code is upstream_failed, capacity_unavailable or content_blocked. In every case the cost is 0.

Limits and retention

  • 60 requests per minute per key. Responses carry X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset.
  • 5 jobs in progress at once per key.
  • Clips run 4 to 30 seconds. Prompts are up to 4,000 characters.
  • Result links last 24 hours. Result files last 7 days.
  • Up to 20 active keys per account.

Need higher limits? Email support@llms.cheap with your expected volume.

Content rules

Prompts and input images are checked before anything is sent to a supplier. Requests for sexual content, anything sexual involving minors, graphic violence, real people without their consent, deceptive deepfakes or copyrighted characters and brands are refused with 451 content_blocked and cost nothing. Repeated blocks suspend the account automatically. The full list is in the Acceptable Use Policy.

API reference

Generated from the OpenAPI 3.1 document the API serves, so it cannot drift from the running service. Load that file into Postman, Insomnia or a client generator if you prefer.

get/v1/modelsno key needed

List models

Models, resolutions, duration limits and current prices in credits and USD per second.

Response 200

object
object
data
object[]

Status codes

  • 200The model list.
post/v1/videos/quote

Price a request

Returns what a request would cost without creating it. Nothing is held or charged.

Request body

modelrequired
"seedance-2.5" | "seedance-2.5-flash" | "seedance-2.5-upscaled-1080p"
resolution
"480p" | "720p" | "1080p"Defaults to 720p. The upscaled tier is always 1080p. Flash is 480p or 720p.
duration_secondsrequired
integer, 4 to 30

Response 200

object
object
model
string
resolution
string
upscaled_from
stringPresent only on the upscaled tier.
duration_seconds
integer
credits_per_second
integer
usd_per_second
number
credits
integer
cost_usd
number

Status codes

  • 200The quote.
  • 401Missing or invalid API key.
  • 422The request is not valid.
  • 429Rate limit or concurrency limit reached.
post/v1/videos

Create a video

Creates a job and holds its price in credits. The job runs asynchronously: poll it or pass a webhook_url. If it fails for any reason the hold is released in full.

Parameters

Idempotency-Keyheader
string, max 255 charsSame as the idempotency_key body field. A repeat with the same key and body returns the first job.

Request body

modelrequired
"seedance-2.5" | "seedance-2.5-flash" | "seedance-2.5-upscaled-1080p"
resolution
"480p" | "720p" | "1080p"
duration_secondsrequired
integer, 4 to 30
aspect_ratio
"16:9" | "9:16" | "1:1" | "4:3" | "3:4" | "21:9"default "16:9"
audio
booleandefault true
promptrequired
string, max 4000 chars
image_url
string, uriOptional first frame. https only, JPEG/PNG/WebP, up to 10 MB.
reference_image_urls
string, uri[]Optional reference images.
consent_attested
booleanRequired (true) when any image is sent: confirms every real person shown has consented.
webhook_url
string, uri
idempotency_key
string, max 255 chars

Response 202

id
string
object
object
status
"queued" | "moderating" | "submitted" | "running" | "upscaling" | "mirroring" | "succeeded" | "failed" | "canceled"
progress
integer, 0 to 100
model
string
resolution
string
upscaled_from
stringPresent only on the upscaled tier: the resolution the video was generated at.
duration_seconds
integer
aspect_ratio
string
audio
boolean
prompt
string
credits_held
integer
credits_charged
integer
cost_usd
number
result
object | null
error
object | null
created_at
string, date-time
completed_at
string | null, date-time

Status codes

  • 202The job was created.
  • 401Missing or invalid API key.
  • 402insufficient_credits: the balance cannot cover the request.
  • 409idempotency_conflict: the key was used with a different body.
  • 422validation_error or consent_required.
  • 429Rate limit or concurrency limit reached.
  • 451content_blocked: the request breaks the content policy.
  • 503capacity_unavailable: no supplier can serve the tier right now. Nothing was held.
get/v1/videos

List videos

Parameters

limitquery
integer, 1 to 100default 20
beforequery
stringReturn jobs created before this job id.

Response 200

object
object
data
VideoJob[]
has_more
boolean

Status codes

  • 200Jobs, newest first.
  • 401Missing or invalid API key.
  • 429Rate limit or concurrency limit reached.
get/v1/videos/{id}

Get a video

Status, progress, credits charged and, once succeeded, a result URL signed for 24 hours.

Parameters

idpathrequired
string

Response 200

id
string
object
object
status
"queued" | "moderating" | "submitted" | "running" | "upscaling" | "mirroring" | "succeeded" | "failed" | "canceled"
progress
integer, 0 to 100
model
string
resolution
string
upscaled_from
stringPresent only on the upscaled tier: the resolution the video was generated at.
duration_seconds
integer
aspect_ratio
string
audio
boolean
prompt
string
credits_held
integer
credits_charged
integer
cost_usd
number
result
object | null
error
object | null
created_at
string, date-time
completed_at
string | null, date-time

Status codes

  • 200The job.
  • 401Missing or invalid API key.
  • 404No job with this id.
  • 429Rate limit or concurrency limit reached.
post/v1/videos/{id}/cancel

Cancel a video

Cancels a job that has not completed and releases its hold.

Parameters

idpathrequired
string

Response 200

id
string
object
object
status
"queued" | "moderating" | "submitted" | "running" | "upscaling" | "mirroring" | "succeeded" | "failed" | "canceled"
progress
integer, 0 to 100
model
string
resolution
string
upscaled_from
stringPresent only on the upscaled tier: the resolution the video was generated at.
duration_seconds
integer
aspect_ratio
string
audio
boolean
prompt
string
credits_held
integer
credits_charged
integer
cost_usd
number
result
object | null
error
object | null
created_at
string, date-time
completed_at
string | null, date-time

Status codes

  • 200The canceled job.
  • 401Missing or invalid API key.
  • 404No job with this id.
  • 409not_cancelable: the job already finished.
  • 429Rate limit or concurrency limit reached.
get/v1/balance

Get the balance

Response 200

object
object
credits
integerSpendable credits.
usd
number
held_credits
integerReserved by jobs in progress.
held_usd
number

Status codes

  • 200Spendable and held credits.
  • 401Missing or invalid API key.
  • 429Rate limit or concurrency limit reached.