
In short: when the image is ready, you get links to the files in outputs. Those links are not permanent. If you put them straight into your website, the image may disappear one day. Download the file and keep your own copy, on the website or in the project.
Where the links are
Through the API, call GET /v1/media/generations/{id} until the status is completed. The links are in the outputs list and the real cost in credits_charged. The full request, from start to end, is in creating AI images through the API.
Downloading with curl
Replace the text in quotes with the link from outputs. -o gives the file its name and -L follows a redirect, if there is one:
curl -L -o hero.jpg "<link from outputs>"
The file format depends on the model. In the example in our documentation, the output_format field chooses jpeg (the default) or png: give the file the right extension.
Downloading in your program
In Python, right after the check that returned completed (job is that generation):
import requests
url = job["outputs"][0]
with open("hero.jpg", "wb") as f:
f.write(requests.get(url, timeout=60).content)
With aio and with the MCP server
The aio command downloads on its own to the --out folder. If the generation did not finish within the waiting time, download it later with aio status:
aio generate image "a bakery shop window at dawn" --opt size=1024x1024 --out images/
aio status <id> --download --out images/
In a coding agent with the MCP server, ask it to save the file in the project, for example: "Generate a square image of a modern office with plants and morning light, and save it to public/img/hero.png."
Before you put the image on your website
|
|
|
|
| Also keep the prompt (the text you wrote) and the model id next to the file. They help you make more images in the same style. |
|
Need more images? Choose the model and see the price in All in One AI. See All in One AI |
RECOMMENDED PRODUCT Web hosting with cPanel Domain and SSL included, daily backups and the panel you already know. from $5.36/mo (3-year plan, with coupon) See plans |











