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

HeyRuby API

Create anything you want from your own code: describe a shot, add image, video or audio references, and get a finished video with sound back. The same engine as HeyRuby.studio, priced per second.

Every model listed on the Pricing and Explore pages is available in the API today: Seedance 2.0 (bytedance/seedance-2.0), Seedance 2.0 Fast (bytedance/seedance-2.0-fast), Seedance 2.0 Mini (bytedance/seedance-2.0-mini), Seedance 2.5 (bytedance/seedance-2.5) and Seedance 2.5 Flash (bytedance/seedance-2.5-flash), video with sound, 9:16, 16:9 or 1:1. Each model's resolutions, durations, reference limits and price per second are on its Explore card and in GET /v1/models. Images and audio come to the same API next. The full endpoint list is in the API reference.

Base URL

https://platform.heyruby.studio/v1

Every API path starts with /v1. This site, the docs and the API all live on https://platform.heyruby.studio.

Getting started

  1. Sign in. Open https://platform.heyruby.studio and click Sign in. Use your HeyRuby.studio account: same login, same credits.
  2. Create an API key. Go to the API Keys page, give the key a name, say what it is used for and pick when it expires (30 days, 90 days, 1 year or a date you choose, up to 1 year). The full key is shown once: copy it and keep it on your server.
  3. Put the key in your environment:
    export HEYRUBY_API_KEY="paste-your-key-here"
  1. Check your balance:
    curl https://platform.heyruby.studio/v1/balance -H "Authorization: Key $HEYRUBY_API_KEY"

The answer is {"credits":12345}: the same credits as your HeyRuby.studio account, also shown at the top of this site when you are signed in.

  1. Pick a model on the Explore page (or GET /v1/models) and ask for a quote (free, nothing is charged):
    curl -X POST https://platform.heyruby.studio/v1/quote \
      -H "Authorization: Key $HEYRUBY_API_KEY" -H "Content-Type: application/json" \
      -d '{"model":"bytedance/seedance-2.0","prompt":"A slow push in on a lighthouse at dusk, waves crashing","resolution":"720p","duration":5,"aspect_ratio":"16:9"}'
  1. Submit the job. Send an Idempotency-Key so a retry never creates a second job:
    curl -X POST https://platform.heyruby.studio/v1/models/bytedance/seedance-2.0/requests \
      -H "Authorization: Key $HEYRUBY_API_KEY" -H "Content-Type: application/json" \
      -H "Idempotency-Key: lighthouse-1" \
      -d '{"prompt":"A slow push in on a lighthouse at dusk, waves crashing","resolution":"720p","duration":5,"aspect_ratio":"16:9"}'

The answer is 202 with request_id, status_url, result_url and cancel_url.

  1. Poll the status every few seconds until it is terminal:
    curl https://platform.heyruby.studio/v1/requests/REQUEST_ID/status -H "Authorization: Key $HEYRUBY_API_KEY"
  1. Fetch the result:
    curl https://platform.heyruby.studio/v1/requests/REQUEST_ID -H "Authorization: Key $HEYRUBY_API_KEY"

A completed result carries output.video.url (a signed link) and credits_charged.

Prices per second for every model and resolution are on the Pricing page and on each model's Explore page.

Authentication

Send your key on every request:

Authorization: Key YOUR_API_KEY

Authorization: Bearer YOUR_API_KEY works too. Keys have scopes: generate (quote and submit), read (status, results, list) and balance; keys you create on the API Keys page have all three. Keep keys on your server; never put them in a web page or an app.

A missing, wrong or revoked key answers 401 INVALID_KEY; a key past its expiry date answers 401 KEY_EXPIRED. A revoked key stops working within a minute.

Managing keys

On the API Keys page you can:

  • Create a key with a name, what it is used for and an expiry (30 days, 90 days, 1 year or a custom date up to 1 year). Every key you create expires; make a new one before the old one runs out.
  • See every key: name, use, the first characters of the key, when it was created, when it expires, when it was last used and its status (active, expired or revoked). The full key is never shown again after it is created.
  • Revoke a key at once. Revoking is permanent.

You can have up to 10 active keys.

References

Add public HTTPS links to your inputs and name them in the prompt in order: @Image1, @Video1, @Audio1.

  • image_urls: up to 10 images (PNG, JPEG or WebP, 15 MB each).
  • video_urls: up to 3 videos, each 2 to 15 s, 15 s combined, 50 MB each.
  • audio_urls: up to 3 audio files, each up to 15 s, 15 s combined; audio needs at least one image or video.

Links must be https on port 443 and publicly reachable; private, local and cloud metadata addresses are refused. References change the price, so quote again when you add them.

Job lifecycle

StatusMeaning
queuedAccepted and waiting. You can still cancel it.
in_progressRendering.
completedDone. The result has the video link.
failedIt did not render. The credits come back.
canceledYou canceled it while queued. The credits come back.
nsfwRefused by the safety check. The credits come back.

Terminal statuses are completed, failed, canceled and nsfw. Cancel with POST /v1/requests/{request_id}/cancel while the job is queued.

Credits and pricing

Every job is quoted before it runs and charged the quoted credits when it starts; a job that fails, is canceled or is refused gives the credits back. GET /v1/balance shows your credits, and so does the top of this site when you are signed in. If your balance is below the quote, submit answers 402 INSUFFICIENT_CREDITS and nothing is downloaded or charged. Per-second prices for every model are on the Pricing page.

Playground

Every model on Explore has a Playground at https://platform.heyruby.studio/explore/<model id>/playground (for example https://platform.heyruby.studio/explore/bytedance/seedance-2.0/playground). It is the HeyRuby.studio Freestyle form with that model picked: prompt, reference links, resolution, length, shape (aspect ratio) and sound.

  • Price first. The price shows before you run, in credits and US dollars, from the same calculation as POST /v1/quote.
  • Same checks as the API. A run is validated and quoted exactly like POST /v1/quote (references are downloaded and checked the same way).
  • Simulated. A run does not render anything and uses no credits. You see the exact request your code would send, the responses the API would return (202 with request_id, then queued, in_progress, completed), and you wait for it like a real job. The video at the end is a labelled sample clip, not made from your prompt.
  • curl. The same request as a curl command with a copy button; put your key in HEYRUBY_API_KEY and send it for a real render.
  • Sign in with your HeyRuby.studio account to run. Signed out, the page shows an estimated price.

Analytics

Analytics shows the requests made with your own API keys (sign-in required; you only ever see your own account).

  • Group by model, API key or date; show requests, credits or errors; ranges of 7, 30 or 90 days or custom dates (up to 366 days); filter to one key or one model.
  • A stacked chart per day plus a table with the same numbers (requests, errors, credits, latency p50 / p95) and a CSV download.
  • Keys show by name and prefix (hr_live_abcd1234_...), never the key itself. Revoked and expired keys keep their history and are labelled.
  • Playground runs show as Playground, separate from API-key traffic, and never use credits.
  • Every /v1 call is counted, successes and errors, except GET /v1/health. A call without a valid key cannot be tied to an account and is not shown.
  • What is stored per call: key prefix, account, model, endpoint, method, status, latency and credits. Never the key, its hash, headers or request bodies. Single calls are kept 90 days, daily totals 400 days. Dates are UTC.
  • Credits are the credits reserved by accepted submits. A failed job is refunded later; refunds are not subtracted in Analytics yet.

Errors

Errors always look like {"error":{"code":"...","message":"..."}}.

HTTPCodeWhat to do
400INVALID_INPUTFix the request body.
401INVALID_KEYCheck the key; it may be wrong or revoked.
401KEY_EXPIREDThe key is past its expiry date. Create a new one on the API Keys page.
402INSUFFICIENT_CREDITSTop up, then retry.
403SCOPE_DENIEDThe key is missing the scope for this call.
404NOT_FOUNDUnknown request id or route.
409IDEMPOTENCY_CONFLICTThe same Idempotency-Key was used with a different body.
422NOT_RENDERABLEValid JSON the model cannot render (for example a duration out of range).
429RATE_LIMITEDWait for Retry-After seconds.
5xxPROVIDER_ERROR / INTERNALRetry later with the same Idempotency-Key. Nothing is charged for a failed submit.

Rate limits

Per key: 10 submits per minute and 60 reads per minute. Every response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset; a 429 also carries Retry-After. Too many failed key checks from one address are slowed down too.

Webhooks

Webhooks are not switched on yet: a request with webhook_url answers 400 for now, so poll status_url instead. When they arrive they will POST the result body to your URL, signed with X-HeyRuby-Signature (see the API reference).

Sign in

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

or