Table of contents
Some models generate files as output, like images, audio, or video.
When a model generates files, they are automatically uploaded to a Replicate-managed domain, and the URL to each file is included in the output
of the model's response.
Here's a simplified example prediction from the Flux Schnell model, which can produce multiple output files in a single run:
For predictions created through the API, output files are automatically deleted after an hour. You must save a copy of any files in the output if you'd like to continue using them. For more details on how to store prediction data, see the webhooks docs.
For predictions created through the web interface, output files are kept indefinitely, unless you delete them manually.
Output files are served by replicate.delivery
and its subdomains.
If you use an allow list of external domains for your assets, add replicate.delivery
and *.replicate.delivery
to it.
For example, if you're building a Next.js app that displays output files from Replicate, update your Next.js config as follows: