A generation, step by step
- Pick a model. The assistant calls
search_modelsto compare models, modes and prices, thenget_modelfor the exact fields and allowed values of the mode it picks. - Generate. It calls
generate_mediawith the model, the mode and itsinput. Argil checks the input against that model’s rules first: a wrong value comes back named, with what is allowed, and nothing is spent. - Wait. A call answers within about 40 seconds.
- Images are usually done by then: the answer has the result.
- Videos take minutes. The answer says
processingand how long that model usually takes; the assistant checks again withget_generation, which waits up to 40 seconds per call, until the video is ready.
- Get the result. A finished generation gives the file’s URL, which never expires, a small preview the assistant can look at, its asset id, and what was charged. Every output is also in your Argil library and playground.
A generation keeps running even if the conversation stops. Ask “check on my last video” later instead of asking again: a new request starts, and bills, a new generation.
Your files
Anything a model takes as an image, a video or an audio (a first frame, a reference, an audio to lip-sync) can be:
You never write these yourself: say “use my latest upload”, “this photo” or “my character Mia”, and the assistant finds the id.
- Elements carry labelled reference images called plates (
front,profile,hero…). Withoutplate, an element brings all of them. - Voices and avatars come from
list_voicesandlist_avatars: a speech model or Argil Atom takes a voice as{"id": "…"}, and an avatar is passed as its image. - Naming references in the prompt. References are numbered in the order given. To say which is which, use the wording the model expects, given in its
promptfield (get_modelshows it). - Limits: a URL must be public; an upload can be up to 2 GB. A file still processing when a generation starts is waited for, up to 60 seconds.
Credits
Generations spend your workspace’s credits, at the same prices as in the app. Everything else (models, library, estimates) is free.- Prices are on each model page, and in
search_modelsandget_model. Ask “how much would it cost?” and the assistant callsestimate_generation, which prices the exact request and says whether your balance covers it. - A ceiling per generation. “At most 30 credits” becomes
max_credits: a generation above it is refused before anything is spent, with its price. - Retries never pay twice. With an
idempotency_key, a retried call returns the generation already started. - Failures are refunded. Credits are reserved when a generation starts and come back if it fails. Some modes are priced on what the model actually produced: the reserve is adjusted at the end and the difference refunded.
- Short balance. The assistant says how many credits are needed. Credits are bought in the Argil app, not through the assistant.
