Image GenerationImagen
Imagen 4 Ultra
Ultra version of Imagen 4 for when quality matters more than speed and cost.
POST /v2/images/generate — model: "imagen-4-ultra"
The ultra version of Google's Imagen 4, optimized for maximum quality output. Use this when image fidelity matters more than generation speed and cost. Supports up to 2K resolution.
See Image Generation overview for common request fields, response format, and error codes.
Model-specific parameters
| Parameter | Type | Description |
|---|---|---|
imagenParams.aspect_ratio | string | Aspect ratio. Values: "1:1" (default), "9:16", "16:9", "3:4", "4:3" |
imagenParams.output_format | string | Output format. Values: "jpg" (default), "png" |
imagenParams.image_size | string | Image resolution. Values: "1K" (default), "2K" |
Credit cost
| Credits per generation |
|---|
| 6 |
Code examples
curl -X POST https://api.apiframe.ai/v2/images/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "A cinematic photorealistic portrait with golden hour sunlight, shallow depth of field, natural film grain",
"model": "imagen-4-ultra",
"imagenParams": {
"aspect_ratio": "16:9",
"output_format": "jpg"
}
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/images/generate",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"prompt": "A cinematic photorealistic portrait with golden hour sunlight, shallow depth of field, natural film grain",
"model": "imagen-4-ultra",
"imagenParams": {
"aspect_ratio": "16:9",
"output_format": "jpg",
},
},
)
print(response.json())const response = await fetch("https://api.apiframe.ai/v2/images/generate", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "A cinematic photorealistic portrait with golden hour sunlight, shallow depth of field, natural film grain",
model: "imagen-4-ultra",
imagenParams: { aspect_ratio: "16:9", output_format: "jpg" },
}),
});
console.log(await response.json());Try it
POST
/v2/images/generateTry it