Generate images
curl --request POST \
--url https://api.aireserve.com/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-2.5-flash-image",
"prompt": "A watercolor painting of a fox in a snowy forest",
"n": 1,
"size": "1024x1024",
"response_format": "url"
}
'import requests
url = "https://api.aireserve.com/v1/images/generations"
payload = {
"model": "gemini-2.5-flash-image",
"prompt": "A watercolor painting of a fox in a snowy forest",
"n": 1,
"size": "1024x1024",
"response_format": "url"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'gemini-2.5-flash-image',
prompt: 'A watercolor painting of a fox in a snowy forest',
n: 1,
size: '1024x1024',
response_format: 'url'
})
};
fetch('https://api.aireserve.com/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Images
Generate images
Generate images. Synchronous — multi-image or high-quality generations can take tens of seconds, so set client timeouts accordingly.
POST
/
v1
/
images
/
generations
Generate images
curl --request POST \
--url https://api.aireserve.com/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-2.5-flash-image",
"prompt": "A watercolor painting of a fox in a snowy forest",
"n": 1,
"size": "1024x1024",
"response_format": "url"
}
'import requests
url = "https://api.aireserve.com/v1/images/generations"
payload = {
"model": "gemini-2.5-flash-image",
"prompt": "A watercolor painting of a fox in a snowy forest",
"n": 1,
"size": "1024x1024",
"response_format": "url"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'gemini-2.5-flash-image',
prompt: 'A watercolor painting of a fox in a snowy forest',
n: 1,
size: '1024x1024',
response_format: 'url'
})
};
fetch('https://api.aireserve.com/v1/images/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));Authorizations
Your AI Reserve API key (aireserve_api_…) from Profile → My API Keys in the portal.
Body
application/json
The body is of type object.
Response
200
Default Response
⌘I