A three-tier family behind one endpoint
Fast, Standard, and Ultra share the same prompt structure, so you can swap model IDs to balance speed, quality, and cost without rewriting your workflow.
Google DeepMind's text-to-image model (May 2025), offered in Fast, Standard, and Ultra tiers and known for sharp text rendering, strong prompt following, and output up to 2K resolution.
Integrate Imagen 4 with a single API call — one key, one unified endpoint, and shared billing across every model on Apiframe.
model: "imagen-4"
Fast, Standard, and Ultra share the same prompt structure, so you can swap model IDs to balance speed, quality, and cost without rewriting your workflow.
It produces legible text with accurate font spacing and placement, handling text overlays far more reliably than earlier diffusion models.
It adheres to detailed prompts closely and responds more accurately to camera and style direction than Imagen 3.
Both Standard and Ultra generate crisp 2048x2048 output, suitable for marketing assets and detailed compositions.
It renders photorealism, anime, watercolor, ink-wash, and more, across presets like 1:1, 4:3, 3:4, 9:16, and 16:9.
Every output carries Google's invisible SynthID watermark, alongside configurable safety settings and an optional prompt rewriter.
A few outputs generated through the Imagen 4 API on Apiframe.
A breathtaking mountain range at dawn with a crystal-clear lake reflecting the snow-capped peaks.
A magazine cover reading 'WILD' with a bold serif title and a close-up of a tiger's eye.
An ultra-detailed product shot of a leather watch on linen, soft window light, fine texture.
A watercolor illustration of a quiet Parisian street cafe in the rain.
A vertical 9:16 poster for a jazz night reading 'BLUE ROOM, FRIDAY 9PM' with art-deco type.
A photorealistic close-up of dew droplets on a spiderweb at sunrise, crisp detail.
Send a single POST /v2/images/generate request with your API key to
generate with Imagen 4. The call returns a jobId you can poll or
receive via webhook.
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 sleek silver sports car on a coastal highway at sunset, hyper-realistic",
"model": "imagen-4",
"imagenParams": {
"image_size": "1K",
"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 sleek silver sports car on a coastal highway at sunset, hyper-realistic",
"model": "imagen-4",
"imagenParams": {
"image_size": "1K",
"output_format": "jpg"
}
},
)
print(response.json()) # { "jobId": "...", "status": "QUEUED" }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 sleek silver sports car on a coastal highway at sunset, hyper-realistic",
"model": "imagen-4",
"imagenParams": {
"image_size": "1K",
"output_format": "jpg"
}
}),
});
const { jobId } = await response.json();
console.log(jobId);Generation is asynchronous. A successful submission returns 202 Accepted with a jobId. Poll GET /v2/jobs/{id} (or supply a webhook_url) until the status is COMPLETED; the result field then holds the output URL(s).
{
"jobId": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
"status": "QUEUED"
}curl https://api.apiframe.ai/v2/jobs/JOB_ID \
-H "X-API-Key: afk_your_api_key_here"import requests, time
while True:
job = requests.get(
"https://api.apiframe.ai/v2/jobs/JOB_ID",
headers={"X-API-Key": "afk_your_api_key_here"},
).json()
if job["status"] in ("COMPLETED", "FAILED"):
break
time.sleep(2)
print(job["result"])let job;
do {
await new Promise((r) => setTimeout(r, 2000));
job = await fetch("https://api.apiframe.ai/v2/jobs/JOB_ID", {
headers: { "X-API-Key": "afk_your_api_key_here" },
}).then((r) => r.json());
} while (job.status !== "COMPLETED" && job.status !== "FAILED");
console.log(job.result);Request parameters accepted by the Imagen 4 endpoint. Model-specific options are nested under the params object shown below.
| Parameter | Type | Required | Default | Allowed / range | Description |
|---|---|---|---|---|---|
| prompt | string | required | — | — | Text description of what to generate. |
| model | string | required | "imagen-4" | "imagen-4" | The model identifier for this endpoint. |
| imagenParams.image_size | string | optional | "1K" | "1K", "2K" | Resolution |
| imagenParams.output_format | string | optional | "jpg" | "jpg", "png" | Output format |
Common questions about the Imagen 4 API.
Google DeepMind's text-to-image model, released in May 2025, available in three tiers through the Gemini API, Google AI Studio, and Vertex AI.
Fast prioritizes speed and low cost at 4 credits ($0.04) per image, Standard balances quality and price at 7 credits ($0.07), and Ultra delivers the highest detail and prompt adherence at 11 credits ($0.11).
Up to 2K (2048x2048) on Standard and Ultra, with the Fast tier topping out lower.
Yes. Cleaner, more legible typography is one of its biggest improvements over Imagen 3.
Yes. Every image includes Google's invisible SynthID watermark.
Through Apiframe, as well as the Gemini API, Google AI Studio, and Vertex AI.
Still have questions?
Get your API key and integrate Imagen 4 in minutes — Pay-as-you-go.
Questions? Join our Discord or contact sales.