Base URL https://platform.heyruby.studio/v1

HeyRuby API v1 reference

The HeyRuby API follows the common queue style: submit -> request_id -> poll status -> fetch result, cancel while queued. (Repo note: this file is the single source of the public reference; the platform site renders it at /docs/reference. Contract history: apitest-1203 / platform-site-r2-1204, Kevin Weinberg, Telegram topic 7283.)

Base URL

https://platform.heyruby.studio/v1

The website, the docs and the API share the host https://platform.heyruby.studio; every API path starts with /v1.

Auth

  • Header: Authorization: Key <api key> (Bearer <api key> also accepted)
  • Create, list and revoke keys on https://platform.heyruby.studio/keys (sign in with your HeyRuby.studio account). Every key you create there expires: 30 days, 90 days, 1 year or a custom date up to 1 year. Up to 10 active keys per account.
  • Key format: hr_live_<8 char prefix>_<32 char secret>. Shown ONCE at creation; the server stores only the prefix and a SHA-256 hash of the key.
  • 401 {"error":{"code":"INVALID_KEY","message":"..."}} for missing / revoked / wrong keys; 401 KEY_EXPIRED for a key past its expiry date.

Endpoints

MethodPathPurpose
GET/v1/health{"ok":true,"version":"...","env":"dev"} (no auth)
GET/v1/modelscatalog: id, name, kind, resolutions, durations, aspect_ratios, limits (prices per second: /explore and /pricing)
GET/v1/balance{"credits":12345} for the key's account
POST/v1/quotesame body as submit plus "model"; {"credits":N,"issues":[]} (no charge)
POST/v1/models/{model_id}/requestssubmit; header Idempotency-Key (optional, 24 h); 202 + ids/urls below
GET/v1/requests/{request_id}/status{"request_id","status","queue_position"?,"error"?}
GET/v1/requests/{request_id}full result (below)
POST/v1/requests/{request_id}/cancelonly while queued; {"status":"canceled","credits_refunded":N}
GET/v1/requests?limit=&cursor=the key owner's recent requests

model_id: bytedance/seedance-2.0, bytedance/seedance-2.0-fast, bytedance/seedance-2.0-mini, bytedance/seedance-2.5, bytedance/seedance-2.5-flash (e.g. path /v1/models/bytedance/seedance-2.5/requests). Every model listed on /pricing is served. Each model's resolutions, durations and reference limits come from GET /v1/models; a value the model does not render answers 422 NOT_RENDERABLE before anything is charged. Every model: https://platform.heyruby.studio/explore

Submit body (example: Seedance 2.0)

{
  "prompt": "A slow push in on @Image1 ... like @Video1 ... to @Audio1",
  "resolution": "480p",            // one of the model's resolutions in GET /v1/models (Seedance 2.0: 480p | 720p | 1080p | 4k; Fast, Mini, 2.5 Flash: 480p | 720p)
  "duration": 5,                   // 4..15 s
  "aspect_ratio": "9:16",          // 9:16 16:9 1:1
  "image_urls": ["https://..."],   // <= 10, tagged @Image1..@ImageN in order
  "video_urls": ["https://..."],   // <= 3, each 2..15 s, 15 s combined
  "audio_urls": ["https://..."],   // <= 3, each <= 15 s, 15 s combined, needs >= 1 image or video
  "webhook_url": "https://..."     // not switched on yet (answers 400)
}

Refs are public HTTPS URLs. The service downloads them into our media store before the job runs.

Submit response (202)

{"request_id":"req_...","status":"queued","credits_reserved":120,
 "status_url":".../v1/requests/req_.../status","result_url":".../v1/requests/req_...","cancel_url":".../v1/requests/req_.../cancel"}

Status values

queued (cancelable), in_progress, completed, failed, canceled, nsfw. Terminal: completed, failed, canceled, nsfw. failed / canceled / nsfw refund the reservation.

Result

{"request_id":"req_...","status":"completed","model":"bytedance/seedance-2.0","credits_charged":120,
 "created_at":"...","completed_at":"...","output":{"video":{"url":"https://... (signed, >= 7 days)","width":480,"height":854,"duration":5}},"error":null}

Webhook

Not switched on in this version (webhook_url answers 400). Planned: POST to webhook_url on completed / failed / nsfw with the Result body. Header X-HeyRuby-Signature: t=<unix>,v1=<hex HMAC-SHA256(secret, t + "." + body)>. Retries with backoff for 24 h on non-2xx.

Errors

{"error":{"code":"...","message":"..."}}: 400 INVALID_INPUT, 401 INVALID_KEY, 401 KEY_EXPIRED, 402 INSUFFICIENT_CREDITS, 403 SCOPE_DENIED, 404 NOT_FOUND, 409 IDEMPOTENCY_CONFLICT, 422 NOT_RENDERABLE, 429 RATE_LIMITED (Retry-After), 429 CONCURRENCY_LIMIT, 5xx PROVIDER_ERROR / INTERNAL.

4K (Seedance 2.0 only)

  • "resolution": "4k" (aliases "4K", "2160p"). Frame: 16:9 3840x2160, 9:16 2160x3840, 1:1 2880x2880.
  • One 4K job at a time per API key: a 4K submit while an earlier 4K request of the same key is queued or running answers 429 CONCURRENCY_LIMIT and names that request; nothing is reserved or charged. Other resolutions and other keys are not affected.
  • If the provider refuses the job because its own 4K capacity is full, the request ends failed (PROVIDER_ERROR) and the reserved credits are refunded in full, like every failed job.
  • Output: H.264 High (8-bit, yuv420p, plays in every browser), CRF 18, about 18 to 19 Mb/s, AAC audio, faststart. A 5 s clip is about 11 to 12 MB; 1080p and lower outputs keep their usual encode (CRF 23).

Rate-limit headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset.

Sign in

Use your HeyRuby.studio account. Same login, same credits.

or