Skip to main content
Every media field of a generation input (references, and the single media fields a mode has, listed in its capabilities.media) takes a MediaRef: one of your files, a URL, or an element built in Argil. A mode’s capabilities say which single media fields it has (media) and how many references of each kind (images, videos, audio) it takes (references). See the mode’s page in the model catalog.

How references resolve

  • Asset ids must belong to your workspace, or to Argil’s public library. A file still uploading is 409 asset_not_uploaded; a file still processing is waited for, up to 60 seconds (409 asset_not_ready past that).
  • URLs must be public https. Argil imports them into your library (the same URL twice is the same asset), and the generation waits for the download. A URL whose host resolves to a private network is refused, redirects included.
  • Elements must belong to your workspace or Argil’s public library. Without plate, an element passed in references brings all its plates, each an image reference; in a single media field it brings its first plate. plate picks one by label. A lore has no image and is refused.
The kind of each reference (image, video, audio) is read from the file, and checked against the mode’s limits, durations included. A reference the mode cannot take is 400 reference_not_allowed, with the offending entry in param. input is returned as you sent it, so you can tell which reference was which.

Voices and avatars

Voices and avatars are listed and created with the V1 API, with the same key.
  • A voice goes in voice, on the modes that speak (capabilities.voice): the speech models and Argil Atom’s script-to-video, as in V1’s video moments.
    • voice.id is the id of one of your voices, or of Argil’s public voices, as GET /v1/voices lists them (visibility=public for Argil’s). Another workspace’s voice is 404 reference_not_found; a voice still training or that failed is 400 reference_not_allowed, and so is a voice the mode’s provider cannot speak with: pick another voice or mode.
    • voice.settings (speed, stability, similarity, style: the ones the mode’s schema lists) default to the voice’s own.
    • voice.model, on Argil Atom only, is the TTS model that speaks the script (eleven_v3, speech-2.8-hd…); it defaults to the voice’s own. A speech model speaks with itself.
  • An avatar is an image: pass its coverImageUrl from GET /v1/avatars as a URL reference, for example to Argil Atom’s image.
To lip-sync a recording instead of a script, use argil-atom in mode audio-to-video with an image and an audio: your file, or the output of a speech model.

Chain generations

An output is an asset, so chaining is passing its id to the next generation:

Prompt tags

Point at a reference from the prompt with Argil’s tags: @image1, @video1, @audio1. Each kind is numbered from 1 in the order of references: @image2 is the second image, whatever comes between. An element’s plates count as images, in order. The description of the mode’s prompt field lists the tags it takes. Argil writes the tags in the syntax of the model that runs (Seedance’s @Image1, Grok’s <IMAGE_0>…), so the same prompt works on every model and on every provider a model runs on.
Any other text reaches the model as written: a prompt already in a model’s own syntax works as before. A tag past the end of its list (@image3 with two images) is sent as written too.