{"openapi":"3.1.0","info":{"title":"llms.cheap Video API","version":"1.0.0","description":"Seedance 2.5 video generation. Per-second pricing in credits (1,000 credits = $1.00). Failed, canceled and blocked jobs cost nothing.","contact":{"email":"support@llms.cheap"}},"servers":[{"url":"https://api.llms.sale"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Videos"},{"name":"Account"},{"name":"Models"}],"paths":{"/v1/models":{"get":{"tags":["Models"],"operationId":"listModels","summary":"List models","description":"Models, resolutions, duration limits and current prices in credits and USD per second.","security":[],"responses":{"200":{"description":"The model list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"}}}}}}},"/v1/videos/quote":{"post":{"tags":["Videos"],"operationId":"quoteVideo","summary":"Price a request","description":"Returns what a request would cost without creating it. Nothing is held or charged.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/QuoteRequest"}}}},"responses":{"200":{"description":"The quote.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The request is not valid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/videos":{"post":{"tags":["Videos"],"operationId":"createVideo","summary":"Create a video","description":"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":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Same as the idempotency_key body field. A repeat with the same key and body returns the first job."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateVideoRequest"}}}},"responses":{"202":{"description":"The job was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"insufficient_credits: the balance cannot cover the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"idempotency_conflict: the key was used with a different body.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"validation_error or consent_required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"451":{"description":"content_blocked: the request breaks the content policy.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"capacity_unavailable: no supplier can serve the tier right now. Nothing was held.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"tags":["Videos"],"operationId":"listVideos","summary":"List videos","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"before","in":"query","schema":{"type":"string"},"description":"Return jobs created before this job id."}],"responses":{"200":{"description":"Jobs, newest first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJobList"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/videos/{id}":{"get":{"tags":["Videos"],"operationId":"getVideo","summary":"Get a video","description":"Status, progress, credits charged and, once succeeded, a result URL signed for 24 hours.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No job with this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/videos/{id}/cancel":{"post":{"tags":["Videos"],"operationId":"cancelVideo","summary":"Cancel a video","description":"Cancels a job that has not completed and releases its hold.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The canceled job.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoJob"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No job with this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"not_cancelable: the job already finished.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/balance":{"get":{"tags":["Account"],"operationId":"getBalance","summary":"Get the balance","responses":{"200":{"description":"Spendable and held credits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"401":{"description":"Missing or invalid API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or concurrency limit reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"video.succeeded":{"post":{"summary":"A job succeeded","description":"Sent to the job's webhook_url. Verify X-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + \".\" + body)>. Retried with backoff for 24 hours.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"2XX":{"description":"Acknowledged."}}}},"video.failed":{"post":{"summary":"A job failed","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"2XX":{"description":"Acknowledged."}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key: \"Authorization: Bearer sk_live_...\""}},"schemas":{"QuoteRequest":{"type":"object","required":["model","duration_seconds"],"properties":{"model":{"type":"string","enum":["seedance-2.5","seedance-2.5-flash","seedance-2.5-upscaled-1080p"]},"resolution":{"type":"string","enum":["480p","720p","1080p"],"description":"Defaults to 720p. The upscaled tier is always 1080p. Flash is 480p or 720p."},"duration_seconds":{"type":"integer","minimum":4,"maximum":30}}},"CreateVideoRequest":{"type":"object","required":["model","duration_seconds","prompt"],"properties":{"model":{"type":"string","enum":["seedance-2.5","seedance-2.5-flash","seedance-2.5-upscaled-1080p"]},"resolution":{"type":"string","enum":["480p","720p","1080p"]},"duration_seconds":{"type":"integer","minimum":4,"maximum":30},"aspect_ratio":{"type":"string","enum":["16:9","9:16","1:1","4:3","3:4","21:9"],"default":"16:9"},"audio":{"type":"boolean","default":true},"prompt":{"type":"string","maxLength":4000},"image_url":{"type":"string","format":"uri","description":"Optional first frame. https only, JPEG/PNG/WebP, up to 10 MB."},"reference_image_urls":{"type":"array","maxItems":8,"items":{"type":"string","format":"uri"},"description":"Optional reference images."},"consent_attested":{"type":"boolean","description":"Required (true) when any image is sent: confirms every real person shown has consented."},"webhook_url":{"type":"string","format":"uri"},"idempotency_key":{"type":"string","maxLength":255}}},"Quote":{"type":"object","properties":{"object":{"const":"video.quote"},"model":{"type":"string"},"resolution":{"type":"string"},"upscaled_from":{"type":"string","description":"Present only on the upscaled tier."},"duration_seconds":{"type":"integer"},"credits_per_second":{"type":"integer"},"usd_per_second":{"type":"number"},"credits":{"type":"integer"},"cost_usd":{"type":"number"}}},"VideoJob":{"type":"object","properties":{"id":{"type":"string","examples":["vid_01JEXAMPLE0000000000000000"]},"object":{"const":"video.job"},"status":{"type":"string","enum":["queued","moderating","submitted","running","upscaling","mirroring","succeeded","failed","canceled"]},"progress":{"type":"integer","minimum":0,"maximum":100},"model":{"type":"string"},"resolution":{"type":"string"},"upscaled_from":{"type":"string","description":"Present only on the upscaled tier: the resolution the video was generated at."},"duration_seconds":{"type":"integer"},"aspect_ratio":{"type":"string"},"audio":{"type":"boolean"},"prompt":{"type":"string"},"credits_held":{"type":"integer"},"credits_charged":{"type":"integer"},"cost_usd":{"type":"number"},"result":{"type":["object","null"],"properties":{"url":{"type":["string","null"],"description":"Signed URL, valid 24 hours. Files are deleted after 7 days."},"expires_at":{"type":"string","format":"date-time"},"width":{"type":"integer"},"height":{"type":"integer"},"duration_seconds":{"type":"number"},"has_audio":{"type":"boolean"}}},"error":{"type":["object","null"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}},"created_at":{"type":"string","format":"date-time"},"completed_at":{"type":["string","null"],"format":"date-time"}}},"VideoJobList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/VideoJob"}},"has_more":{"type":"boolean"}}},"Balance":{"type":"object","properties":{"object":{"const":"balance"},"credits":{"type":"integer","description":"Spendable credits."},"usd":{"type":"number"},"held_credits":{"type":"integer","description":"Reserved by jobs in progress."},"held_usd":{"type":"number"}}},"ModelList":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"native":{"type":"boolean"},"upscaled_from":{"type":"string"},"durations":{"type":"object","properties":{"min":{"type":"integer"},"max":{"type":"integer"}}},"aspect_ratios":{"type":"array","items":{"type":"string"}},"pricing":{"type":"array","items":{"type":"object","properties":{"resolution":{"type":"string"},"credits_per_second":{"type":"integer"},"usd_per_second":{"type":"number"}}}}}}}}},"WebhookEvent":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["video.succeeded","video.failed"]},"created_at":{"type":"string","format":"date-time"},"data":{"$ref":"#/components/schemas/VideoJob"}}},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"type":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}