References and assets
How-to guide · Assumes you have completed the Image & Video quickstart.
Overview
Most Image & Video models accept media alongside the prompt: a first frame for a video, images to
edit, audio to lip-sync against. Every media-valued field on the API takes a reference object rather
than raw bytes in a fixed shape, and each reference is tagged with a type that says where the
media comes from.
The three kinds are interchangeable wherever a reference is accepted, so the same field can take a generation on one request and an uploaded asset on the next.
Chain one generation into the next
A generation reference is the cheapest way to build a pipeline: nothing is uploaded, and the
output of the first generation is used directly as the input of the second. This example generates a
still image, then animates it as the first frame of a video.
If the referenced generation has not completed, the dependent generation fails with a
dependency_failed reason, so wait for the first generation before submitting the second.
Upload media as an asset
Upload a file to the assets API when the media comes from outside ElevenLabs and you want to reuse it across generations. Assets belong to the workspace and persist until you delete them.
The upload response describes the stored asset:
content_url is a signed URL valid for about an hour, and is null while the upload is still being
processed. Fetch the asset again for a fresh URL.
Reaching the assets API with an API key requires a Pro plan or above, the same tier as the generation endpoints.
Storage limits
Uploaded assets count against a total storage limit for the workspace, which depends on your plan:
Only the files you upload count toward the limit; generated outputs do not. An upload that would
take the workspace over its limit is rejected with an asset_storage_limit_exceeded error before
the file is read. Delete assets you no longer need to free space, or contact support to have the
limit raised.
Manage assets
List assets newest first, optionally filtering by name, and page through results with the cursor
from the previous response. page_size accepts 1 to 100 and defaults to 30.
Retrieve or delete a single asset by ID. Deleting an asset does not affect generations that already used it.
Pass media inline
An inline_base64 reference carries the media in the request body, which avoids a separate upload
for one-off inputs. Encode the file with the standard base64 alphabet and declare its MIME type.
Inline media is stored as an ephemeral asset with no retention guarantee and may be deleted once the generation completes. Upload the file to the assets API instead when you need to reference the same input more than once.
Inline content is capped at 25MB per reference after decoding. Larger files belong on the assets API, which accepts much bigger uploads and does not pay the base64 size penalty. Each modality accepts a fixed set of MIME types:
Reference fields by model
Reference fields are named for the role the media plays. start_frame and end_frame are single
images that bound a video, image and audio are the required inputs of a lip-sync model, and the
bare plurals images, videos, and audios are free-form reference material the model draws from.
Which fields a model accepts, and which combinations are valid, differ per model. An end_frame
always requires a start_frame. Violating a constraint returns a validation error naming the
offending field, so the generation never starts and is never charged.
Veo 3.1
Both Veo models accept start_frame, end_frame, and up to three entries in images. Unlike other
models, each entry in images wraps the reference together with the role it plays:
A subject reference places the image’s subject or scene elements into the video; a style
reference transfers its visual style. Reference images cannot be combined with start_frame or
end_frame, and require the eight-second duration.
Seedance
The ByteDance models are disabled by default and require explicit approval before use. Contact support to request access.
The three Seedance 2.0 tiers accept start_frame, end_frame, up to 9 images, up to 3 videos,
and up to 3 audios, subject to these constraints:
- References cannot be combined with
start_frameorend_frame. - Reference audio requires at least one reference image or video, for example to drive lip-sync.
- The combined number of reference files must not exceed 12.
Seedance 2.5 raises the caps to 30 images, 10 videos, and 10 audios with no combined total,
and drops the rule that reference audio needs an accompanying image or video, so audio-only input is
accepted. References still cannot be combined with start_frame or end_frame.
GPT Image
The GPT Image models accept a mask alongside images. Fully transparent areas of the mask mark
where the first reference image may be edited. A mask without reference images is rejected.