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.
curl https://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).
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. |
count | Images per task, 1–4. Priced per image. |
quality | auto, low, medium or high. |
output_format | png, jpeg or webp. |
seed | A fixed seed, for repeatable results. |
Video
| Field | Description |
|---|---|
prompt | What happens in the video. Required. |
mode | t2v (text only), i2v (one image), first_last (first and last frame) or r2v (reference images). Inferred from image_urls when omitted. |
image_urls | Images for i2v, first_last or r2v. |
duration | Length in seconds. Most models price per second. |
resolution | 480p, 720p, 1080p or 4k. |
aspect_ratio | e.g. 16:9, 9:16, 1:1, adaptive. |
audio | Generate sound, where the model supports it. |
seed | A fixed seed, for repeatable results. |
The mode must match the images: t2v takes none, i2v one, first_last two (first and last frame), r2v one or more. Without mode, it is inferred from the number of images.
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.