> ## Documentation Index
> Fetch the complete documentation index at: https://docs.argil.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Inputs and prompt tags

> Pass your files and Argil elements to a generation, and point at them from the prompt with Argil's tags.

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.

| Form | Example | Use it for |
| - | - | - |
| Asset id | `"asset_91a3…"` or `{ "type": "asset", "id": "asset_91a3…" }` | [Assets](https://docs.argil.ai/v2/library/assets.md): uploads and previous outputs |
| URL | `{ "type": "url", "url": "https://…" }` | Files you host |
| Element | `{ "type": "element", "id": "elm_8e3b…", "plate": "front" }` | [Elements](https://docs.argil.ai/v2/library/elements.md): characters, styles, locations, props |

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](https://docs.argil.ai/v2/models/overview.md).

## 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](https://docs.argil.ai/v2/get-started/migrate-from-v1.md), 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`](https://docs.argil.ai/api-reference/endpoint/voices.list) 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`](https://docs.argil.ai/api-reference/endpoint/avatars.list) as a URL reference, for example to Argil Atom’s `image`.

```json theme={null}
{ "model": "argil-atom", "mode": "script-to-video",
  "input": {
    "text": "Welcome back! Here is what changed this week, in one minute.",
    "voice": { "id": "6f1c2a9e-4b7d-4c1e-9a3f-0b5d8e2c7a14", "settings": { "speed": 1.05 } },
    "image": { "type": "url", "url": "https://…/avatar-cover.png" } } }
```

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:

```json theme={null}
{ "model": "seedance-2.5", "mode": "image-to-video",
  "input": { "first_frame": "asset_3f7a1c9e5b2d4a8e6c0f2b4d6a8e0c13", "prompt": "Steam rises, slow push-in", "duration": 6 } }
```

## 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.

```json theme={null}
{
  "model": "seedance-2.5",
  "mode": "reference-to-video",
  "input": {
    "prompt": "@image1 walks through the market of @image2 at dawn",
    "references": [
      { "type": "element", "id": "elm_8e3b5d7f9a1c4e6b8d0f2a4c6e8b0d25", "plate": "front" },
      { "type": "url", "url": "https://cdn.example.com/harbor.jpg" }
    ]
  }
}
```

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.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.