API reference
Models and parameters
List the models on sale with their prices, and the input fields of image, video and audio tasks.
List models
GET /v1/models is public and needs no key. It returns every model on sale: its ID, media type, parameter limits (constraints), defaults (defaults) and the price on each route.
A field marked "ignored": true in constraints is accepted but does nothing on that model, such as Nano Banana's quality, output_format and seed.
curl https://api.janvia.io/v1/models
Each route's pricing is a list; the first entry whose condition matches applies. per is the unit:
call: per request.image: per image, timescount.second: per second, timesduration.kchar: per 1,000 characters of speech text (rounded up).token: per token.token_rates_usdgives dollars per million tokens for text input, image input and output. A task is charged an estimate from the model'stoken_estimate(output tokens per image by parameters, first match wins, plus input tokens per reference image) and settled on the tokens actually used; see Billing. A route whose upstream ignores quality or size carries its owntoken_estimatein its tier, which wins.
A tier with "upscaled": true means that route renders at a lower resolution and enlarges the image to the size asked for, rather than generating it natively.
What each model accepts is on its model page under Parameters. If no route supports a combination of parameters, the request returns 400 unsupported_parameters.
Image
| Field | Description |
|---|---|
prompt | What to generate. Required. |
negative_prompt | What to avoid. |
image_urls | Reference images, or the image to edit: http(s) URLs or base64 data URLs. |
resolution | Output size: 1K, 2K or 4K. |
aspect_ratio | Width to height, e.g. 1:1, 16:9, 9:16; each model lists its own. auto follows the first reference image: GPT Image draws its exact shape (up to 3:1), other models the nearest ratio offered; 1:1 without one. Very long ratios such as 1:4 or 1:8 are used only when asked, and very tall images may come back as several pictures stacked. |
count | Images per task, 1–4. Priced per image. |
quality | auto, low, medium or high. GPT Image only (priced per quality); Nano Banana ignores it. |
output_format | png, jpeg or webp; GPT Image 2.6 also gif (animated) and svg (vector, text to image only). Nano Banana ignores it (its files are almost always JPEG); GPT Image on the express and adobe routes returns PNG for png, jpeg and webp whatever is asked. svg is not available on the express, adobe and plus routes, and a GIF from reference images not on adobe: such tasks go to your other routes. Each file's mime_type says what it is; an SVG link downloads when opened. |
frame_count | GIF only: frames, 2–16 (9 when left out). The express and plus routes always draw 9 frames of 200 ms, so other counts and times skip them. |
frame_duration_ms | GIF only: milliseconds per frame, 20–2000 (200 when left out). The model sizes the frames, so a GIF takes resolution 1K and aspect_ratio auto. |
background | auto, opaque or transparent. GPT Image 2.6 only. transparent needs png or webp, and the express and plus routes do not support it: such tasks go to your other routes. |
seed | A fixed seed, for repeatable results. Nano Banana ignores it. |
Video
| Field | Description |
|---|---|
prompt | What happens in the video. Required, except in replace mode, where it is an optional extra instruction (up to 2,000 characters). |
mode | t2v (text only), i2v (first frame), first_last (first and last frame), last_frame (last frame only), r2v (reference images, videos or audio), replace (the person in one image acts out one motion video) or upscale (an earlier task's video at twice the resolution). Inferred from the inputs when omitted; last_frame and replace must be asked for. |
task_id | upscale: the ID of your finished task whose video to upscale (within 29 days, not upscaled already). Its duration and resolution are used and priced. |
image_urls | Images: the frame for i2v and last_frame, two for first_last, references for r2v, the person for replace. |
video_urls | Reference videos for r2v, or the motion clip for replace: MP4, as http(s) links or base64 data URLs. |
audio_urls | Reference audio for r2v: MP3 or WAV, as http(s) links or base64 data URLs. |
motion_start | replace: where in the motion clip the motion starts, in seconds. The clip must run on for the whole duration. |
tier | Render tier: fast, standard, enhanced or quality. Higher tiers look better and cost more per second. |
duration | Length in seconds. Most models price per second. |
resolution | 480p, 720p, 768p, 1080p or 4k. |
aspect_ratio | e.g. 16:9, 9:16, 1:1, adaptive. |
upscale | none or 2x: upscale the output to twice the resolution, at a surcharge per second. Not every tier, model or mode offers it. |
turbo | Render faster for 30% more on the generation. Best effort: without room it runs at the normal speed, and the difference is refunded when the task completes. |
enhance_prompt | Let the model rewrite the prompt before generating. Replace mode always does. |
keep_video_audio | Use the reference video's own sound instead of generating it. Needs a reference video. |
audio | Generate sound, where the model supports it. |
seed | A fixed seed, for repeatable results. |
The mode must match the inputs: t2v takes none, i2v one image (the first frame), first_last two (first and last frame), last_frame one (the last frame), r2v one or more reference images, videos (video_urls) or audio (audio_urls), and replace one image of a person plus one motion video in video_urls: the person acts out the clip. Without mode, it is inferred: any reference video or audio makes it r2v, otherwise the number of images decides; last_frame and replace must be asked for. In replace the prompt is optional, motion_start picks where in the clip the motion starts, and the clip must run on for the whole duration.
Reference videos are MP4 and reference audio MP3 or WAV, as http(s) links (up to 100 MB each) or base64 data URLs; uploads take images only. keep_video_audio uses the reference video's own sound, enhance_prompt lets the model rewrite the prompt first.
Models priced by tier (MiniMax H3) charge more per second for higher tiers; their outputs always have sound. upscale: "2x" doubles the output resolution for a surcharge per second, and turbo: true renders faster for more. Turbo is best effort: when the upstream has no room, the task runs at the normal speed and the difference is refunded when it completes. A combination a model can't run (say 2x at the enhanced tier) is refused at submit, unbilled.
upscale mode works on a finished video instead of making one: pass task_id, the ID of your own completed task (within 29 days, not upscaled already), to a model that upscales (minimax-h3-upscale). The task takes the source's duration and resolution and is priced on them.
Audio
| Field | Description |
|---|---|
kind | speech or music. Required. |
text | Speech: the text to read. Required for speech. |
voice | Speech: voice ID. |
speed | Speech: 0.5–2. |
format | Speech: mp3 or wav. |
prompt | Music: describe the song. Music needs a prompt or lyrics. |
lyrics | Music: your own lyrics. |
title | Music: song title. |
tags | Music: style tags. |
instrumental | Music: no vocals. |
Image inputs
image_urls takes http(s) URLs or base64 data URLs such as data:image/png;base64,.... Keep each base64 image under about 10 MB and the whole body under 30 MB. For local images, upload them first and pass the URL: smaller requests, faster tasks.