Quickstart
One key, one request shape, every image and video model. Submit a job, poll it, get the file. Your inputs and outputs are never shared or used for training: Privacy.
/data/models.json.POST /v1/chat/completions, billed per token from the same credit: see chat completions.| Base URL | https://api.revana.si/v1 |
| Auth | Authorization: Bearer <key> |
| Submit | POST /v1/generations |
| Poll | GET /v1/generations/{id} |
| Models | GET /v1/models (no key): every model you can generate with right now |
| Balance | GET /v1/balance: what your key’s account can spend |
| Upload | POST /v1/uploads: a link for a reference file on your computer |
| Format | JSON in, JSON out. Prices in USD; 100 credits = $1. |
| Machine-readable | /openapi.json · /llms.txt |
Authentication
Create a key from your account, then send it as a bearer token on every request. Keep it on your server; never ship it in a browser or mobile app.
Submit a generation
Send the model id and its input. The response comes back straight away with a generation id and status queued; the work happens in the background.
| Field | Type | Description |
|---|---|---|
model | string, required | A model id from the models page, e.g. seedance-2.5, or seedance-2.5-fast for faster renders on dedicated compute, built for batches. |
input | object, required | The prompt and settings; see input fields. Unknown fields are refused. |
task | string, optional | On video models, what to do with input.video_url: video_edit or video_extend. See edit or extend a video. Leave it out and each model works as it always has. |
max_cost_usd | number, optional | The most you will pay for this generation, up to 100 (the default). Routes priced above it are skipped; if none is left the request answers 422 max_cost_exceeded. |
max_wait_s | integer, optional | Routes expected to take longer than this many seconds are skipped. Once it has passed no new route is tried, but one already running is allowed to finish (up to 40 minutes) and is charged if it delivers. |
Idempotency-Key | header, optional | Up to 200 characters. Send the same key and body again (after a timeout or a 503) and you get the same generation back, not a second one. The same key with a different body is 409 idempotency_conflict. After a generation has failed, send it again with a new key: the old key keeps answering the failed generation. |
Price it first
Send the same body as a submit to see what it will cost: quoted_usd, reserved_usd (the most it can cost), estimated_seconds, and for your key available_usd and enough_credit. Nothing is created or held, and it is free. Some inputs cost more than a model’s listed rate (Seedance 2.5 with a first frame), so quote the exact request and pass the quote as max_cost_usd.
Get the result
Prefer a per-model endpoint and completion webhooks? See the fal-compatible queue API for request IDs, status/result URLs, supported fal aliases and migration limits.
Poll every few seconds until status is succeeded or failed, then download the files in output.urls with your key: GET /v1/generations/{id}/content for the first, and /content/2, /content/3… when a picture model returns several. Images usually take seconds; video takes from under a minute to several minutes depending on the model and length.
A finished generation:
Input fields
The same names are used across models. Which fields and values each model takes, and its defaults, are listed per model in /data/models.json (options, tasks). If a model doesn’t support a field or value, the request is rejected with 422 invalid_input before anything is charged.
| Field | Type | Used for |
|---|---|---|
prompt | string | What to generate. Required for text-to-image and text-to-video. |
image_url | string (URL) | Start frame for image-to-video, or the image to edit for image-to-image. |
end_image_url | string (URL) | Last frame, for models with first + last frame. |
image_urls | string[] | Reference images, up to the model’s limit. |
resolution | string | 720p, 1080p, 2K... one of the model’s resolutions. |
duration | number | Video length in seconds, one of the model’s durations. |
aspect_ratio | string | 16:9, 9:16, 1:1... |
audio | boolean | Generate sound with the video, where the model supports it. May change the price. |
negative_prompt | string | What to avoid, on models that take it. |
video_url | string (URL) | A clip to transform, extend or upscale. Its length is measured and, on per-second models, billed. Name what to do with it in task. |
audio_url | string (URL) | The voice or sound a talking-avatar or lip-sync model animates to. |
quality | string | A quality tier on models priced by one (e.g. low, medium, high). |
seed | integer | A seed, on models that take one. |
num_images | integer | Picture models: how many pictures to make (also accepted as n), from 1 (the default) up to the model’s options.max_images, usually 4. The price and the hold are per picture; you are charged only for the pictures delivered and the rest is released. output.urls lists them all. |
Edit or extend a video
Send the clip as input.video_url, what to change as input.prompt, and name the task at the top level. The same body works on every model that does it; only the routes that do that task are used.
task | What happens | Models |
|---|---|---|
video_edit | The clip is changed by the prompt and keeps its length (leave out duration). | seedance-2.5, wan-2.7-videoedit, wan-2.7, happyhorse-1.0, kling-3.0-omni, kling-4.0, wan-3.0 |
video_extend | The clip is continued; send duration for the new part. Priced per second like any clip of the model. | pixverse-v6 |
A model that cannot do the task answers 422 invalid_input and names the models that can. Without task, a clip does what that model does with it by default.
For example: {"model": "wan-2.7-videoedit", "task": "video_edit", "input": {"video_url": "https://example.com/clip.mp4", "prompt": "Make it a snowy night"}}
Seedance 2.5 defaults to 720p, 5 seconds (4–30), 16:9 and no sound, and also takes:
| Field | Type | Used for |
|---|---|---|
video_url | string (URL) | A 4–30 s clip to edit. The result keeps its length, so leave out duration. |
video_urls | string[] | Reference clips, up to 10 and 30 seconds in all. Their seconds are billed at the video-input rate. |
audio_urls | string[] | Reference sound, up to 10 and 30 seconds in all. |
image_url is an exact first frame, so it can’t be combined with reference media; use image_urls for a looser visual reference. end_image_url needs image_url. Media must be public https URLs that download directly.
Nemesis
nemesis restages a clip with your own people, products and places: the clip’s movement, timing and camera, played by up to 8 reference pictures. The result keeps the clip’s length and shape. It is priced at a Seedance 2.5 edit’s rate plus $0.02 a second ($0.08, $0.17 and $0.36 at 480p, 720p and 1080p), per second of the clip in plus the video out.
It follows Scenario ALTER’s recipe: your clip itself is edited, silent, with one frame of it redrawn with the change already made as the first reference, and the clip’s own sound goes back on after. With more than one person, the pictures are matched left to right as the people stand in the first frame.
| Field | Type | Used for |
|---|---|---|
video_url | string (URL), required | The 4–30 s clip to restage. |
image_urls | string[], required | 1–8 reference pictures. |
roles | string[] | One per picture: person (default), product, location or look. |
target_frame | boolean | Before the render, the clip’s first frame is redrawn with the change already made, in the same pose, size and light, and sent as the first reference, so hair, face and clothes stay true to your pictures. On by default for nemesis, off for nemesis-lite. Free. |
guide | string | nemesis-lite only (nemesis always edits the clip itself). clip (default with a target frame): follows the clip’s own picture. people (default without one): the people are replaced and the background kept. scene: everything seen comes from the references and prompt. |
sound | string | original (default on nemesis): the clip’s own sound is put back on. none (default on nemesis-lite): silent. |
face_mesh | boolean | nemesis-lite only. Traces every face in the clip so the new face keeps its expressions, eyes and lips. On by default with guide: "people", off for scene and clip. Send false to leave it off. Never shown in the result. |
resolution | string | 480p, 720p (default) or 1080p. |
prompt | string | Optional direction, up to 5000 characters. |
On nemesis-lite, a clip with nobody in it, sent with guide: "people", is refused with invalid_input and not charged; send it with scene or clip.
How long it takes. First the clip is prepared: on nemesis the target frame is drawn, about 15–40 seconds; on nemesis-lite the voice is separated and each frame becomes the depth guide, about 25 seconds for an 8 second clip and a minute and a half for a 30 second one. Then the video is rendered, which is most of the wait: an 8 second clip at 480p takes about 4–7 minutes. Poll the generation until it is done.
Nemesis Lite
nemesis-lite takes the same input as nemesis and renders it on Wan 3.0: cheaper, a little less faithful on faces and fine detail. The clip is 2–15 s. It is priced at Wan 3.0’s rate plus $0.02 a second ($0.06, $0.09 and $0.16 at 480p, 720p and 1080p), per second of the clip in plus the video out.
Generation object
| Field | Type | Description |
|---|---|---|
id | string | Generation id (gen_…), used to poll. |
object | string | Always generation. |
model | string | The model you asked for. |
status | string | See statuses. |
message | string | Only while a result is being confirmed with a provider: what is happening. |
quoted_usd | number | The price on the cheapest route, which is the one tried first. If it cannot make it and a dearer backup route does, the charge is that route’s price, up to reserved_usd. |
reserved_usd | number | What is held from your balance: the most this generation can cost, if a dearer backup route makes it after other routes were tried. The difference is released when it settles. To never pay more than quoted_usd, set max_cost_usd to it: dearer backups are then skipped. |
output | object | null | When succeeded: urls, the result files (a picture model can return several), with width and height; video also has duration_s and has_audio. Download them promptly; files expire. |
cost_usd | number | null | What was charged. Set once the generation succeeds; 0 when it fails. |
attempts | number | Routes tried, including fallbacks. Only the successful one is billed. |
error | object | null | When failed: code, message and retryable; a content refusal also has reason. See why a generation failed. |
created_at, completed_at | string | ISO 8601 timestamps. |
Statuses
| Status | Meaning |
|---|---|
queued | Accepted, waiting for a route. |
running | Generating. If a route fails, the job stays running while it moves to the next one, and while a result is being confirmed (see message). |
succeeded | Done. output.urls holds the files and cost_usd what you paid. |
failed | Every route failed or the input was refused. Nothing is charged. |
Billing
- You pay from prepaid credits, 100 to the dollar, bought in packs from $10 to $5,000. Every price is a whole number of credits.
- When you submit,
reserved_usdis held from your balance. If the generation fails, all of it is released. - You are charged only when the generation succeeds, at the price quoted for the route that made it. Usually that is the first route at
quoted_usd. When a backup has to make it, it can cost more: that route’s price, or, if a route tried before it was billed by its supplier, what those attempts cost plus 10%, whichever is more. Never abovereserved_usd. - There is no monthly quota or per-minute cap: your balance and
max_cost_usdare the limit. - Each model’s price is on its page and in the price table.
Balance
The account your key belongs to. Check it before a large batch; it costs nothing and does not count against the generation limits.
| Field | Meaning |
|---|---|
available_usd | What a new generation can reserve. A submit whose reserved_usd is more gets 402 insufficient_credits. |
held_usd | Reserved by generations still running. What they don’t use comes back when they settle. |
balance_usd | Available plus held. |
spent_usd | Charged for finished generations, all time. |
*_credits | The same amounts in credits (100 to the dollar), rounded so available never reads higher than it is. |
Uploading a reference file
References are passed as public https:// links. For a file on your own machine, ask for an upload link, send the bytes there, and use the link you get back. It is free.
| Field | Meaning |
|---|---|
upload_url | Send the file here with PUT within an hour, with exactly the headers in upload_headers (its type and size). Anything else is refused. |
url | The file’s link on api.revana.si, good until expires_at (14 days). It needs no key and redirects to the file, so anything that can fetch a link can read it. Use it as a reference in POST /v1/generations. The file is deleted soon after. |
id | upl_… |
Pictures (image/*) up to 30 MB, clips (video/*) up to 50 MB, sound (audio/*) up to 15 MB. A larger or other file gets 413 too_large or 400 invalid_request.
Why a generation failed
A failed generation has error.code, a message written to show to the person who asked, and retryable: true when sending the same request again later can work, false when the request itself has to change. A failed generation is never charged.
| Code | Retryable | When |
|---|---|---|
content_policy | no | The model refused the prompt or the media, or withheld what it made. reason says which rule: sexual (NSFW or adult content), minors (children or teenagers), copyright (copyrighted or third-party material, brands, characters), real_person (a real or famous person’s likeness), or other when the model gives no reason. |
invalid_input | no | A reference could not be read, a prompt names @Image2 when one image was sent, or a value the model rejects. The message says which. |
model_declined | no | The model answered in words instead of making the picture or video, usually because the prompt asks for something it needs and wasn’t sent. Make the prompt describe the result itself. |
reference_changed | no | A reference file changed after it was checked. Send it again. |
max_cost_exceeded | no | The only route that could run costs more than max_cost_usd. |
model_busy | yes | Every route for the model was at capacity. Try again in a minute. |
model_unavailable | yes | No route for the model could take the job right now. |
timeout | yes | No route returned a result in time, or max_wait_s passed. |
all_routes_failed | yes | Every route failed for reasons on their side. |
processing_failed | yes | Nemesis could not prepare the clip, so nothing was sent to a model. Send it again. |
Errors
Errors use HTTP status codes and a JSON body: {"error": {"code": "...", "message": "...", "request_id": "req_..."}}. Every response carries an X-Request-Id header; quote it when you ask for help. Every 429 and 503 carries Retry-After in seconds.
| HTTP | Code | When |
|---|---|---|
| 400 | invalid_request | The body isn’t JSON, is missing model or input, or has a field the API doesn’t know. |
| 401 | unauthorized | Missing or invalid API key. |
| 402 | insufficient_credits | Your available balance doesn’t cover reserved_usd. Top up and retry. |
| 403 | account_disabled | The account is paused. Contact support. |
| 403 | generation_not_enabled | Your key can read prices but can’t generate yet. |
| 403 | card_required | The account’s free credit needs a saved card first. Add one in the dashboard, then retry. |
| 404 | not_found | No generation with this id on your account. |
| 409 | idempotency_conflict | This Idempotency-Key was already used with a different body. |
| 409 | not_ready | Asked for the file before the generation succeeded. |
| 413 | body_too_large | The body is over 1 MB. Send media as URLs. |
| 422 | invalid_input | A field, value or combination the model doesn’t support, or media that can’t be read. Nothing is charged. |
| 422 | max_cost_exceeded | Every route costs more than max_cost_usd. |
| 422 | model_not_available | No model with this id on the API. Ids are on the models page. |
| 429 | rate_limited | Too many requests in the same second from one account (a guard against runaway loops, not a quota). Wait the Retry-After seconds. |
| 429 | concurrency_limit | The account already has its maximum of generations in progress. Retry when one finishes. |
| 503 | busy | A moment of load. Retry after Retry-After with the same Idempotency-Key. |
| 503 | model_unavailable | No route for this model is up right now. Retry shortly. |
| 500 | server_error | Something broke on our side. Safe to retry with the same Idempotency-Key. |
Model list
Every model, its options and prices are published as JSON at /data/models.json, the same file this site renders from.
The API lists the same models at GET https://api.revana.si/v1/models. Called with your key, every price in it is your account’s own. Each image and video model has, beside id, name, kind, tasks, options and price:
| Field | Meaning |
|---|---|
route_prices | For each price key (the keys of price.usd, or *), the price on Route 1, 2, … in the order they are tried, as [usd, fee_usd] per price.unit. Route 1 is the list price. A backup route is only used when the ones before it fail, and costs its own price, never less than the list price. |
options.qualities | The quality tiers you can send as input.quality, when the model has them; options.default_quality is the one used when you send none. |
capabilities | Flags for building a UI: edit (changes a picture or clip you give it), image_input, video_input, audio_input, audio_output, first_last_frame, reference_images, upscale. |
Signed webhooks
Completion webhooks (the queue API’s fal_webhook) are signed with a secret only your account has. Every delivery carries:
Revana-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256>, the HMAC of the timestamp, a dot and the raw request body, keyed with your secret.Revana-Webhook-Id: wh_<request id>, the same on every retry of one delivery, so you can drop repeats.
Your account’s signing secret. It stays the same: fetch it once and keep it with your API key.
To verify a delivery, compute the HMAC over the body exactly as it arrived (before parsing it), compare it in constant time, and refuse a timestamp more than five minutes old: