Janvia

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, times count.
  • second: per second, times duration.
  • 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

FieldDescription
promptWhat to generate. Required.
negative_promptWhat to avoid.
image_urlsReference images, or the image to edit: http(s) URLs or base64 data URLs.
resolutionOutput size: 1K, 2K or 4K.
aspect_ratioWidth to height, e.g. 1:1, 16:9, 9:16.
countImages per task, 1–4. Priced per image.
qualityauto, low, medium or high.
output_formatpng, jpeg or webp.
seedA fixed seed, for repeatable results.

Video

FieldDescription
promptWhat happens in the video. Required.
modet2v (text only), i2v (one image), first_last (first and last frame) or r2v (reference images). Inferred from image_urls when omitted.
image_urlsImages for i2v, first_last or r2v.
durationLength in seconds. Most models price per second.
resolution480p, 720p, 1080p or 4k.
aspect_ratioe.g. 16:9, 9:16, 1:1, adaptive.
audioGenerate sound, where the model supports it.
seedA 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

FieldDescription
kindspeech or music. Required.
textSpeech: the text to read. Required for speech.
voiceSpeech: voice ID.
speedSpeech: 0.5–2.
formatSpeech: mp3 or wav.
promptMusic: describe the song. Music needs a prompt or lyrics.
lyricsMusic: your own lyrics.
titleMusic: song title.
tagsMusic: style tags.
instrumentalMusic: 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.