Image Models
Imagen
Imagen Fast, Standard, and Ultra image generation overview
Imagen uses the Gemini Native predict protocol with path /v1beta/models/{model}:predict. This page explains how to choose Fast, Standard, and Ultra models and how their parameters differ.
Endpoint Path
| Method | Path | Purpose |
|---|---|---|
| POST | /v1beta/models/{model}:predict | Imagen image generation |
curl -X POST "https://api.routescope.ai/v1beta/models/gpt-4o-mini:predict" \ -H "Content-Type: application/json" \ -d '{}'{}Authorization
BearerAuth
AuthorizationBearer <token>
Model relay interface recognition. Request heading: Autoration: Bearer .
In: header
Path Parameters
model*string
Gemini model name.
Request Body
application/json
[key: string]?any
Response Body
application/json
Model Selection
| Model ID | Speed / Quality | Typical Use |
|---|---|---|
imagen-4.0-fast-generate-001 | Speed first | Low-latency sketches, prototyping, and batch creative exploration. |
imagen-4.0-generate-001 | Standard quality | High-quality photorealistic images, illustrations, product visuals, and general creative assets. |
imagen-4.0-ultra-generate-001 | Highest quality | Brand hero visuals, refined product images, and quality-sensitive scenarios. |
Common Parameters
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
instances | array | Yes | None | Prediction input array. Imagen usually needs one instance. |
instances[].prompt | string | Yes | None | English prompt. Official guidance recommends a maximum of 480 tokens. |
parameters.sampleCount | integer | No | 4 | Number of images to generate, from 1 to 4. For Ultra, keep it around 1 to 2. |
parameters.aspectRatio | string | No | 1:1 | Aspect ratio. Supports 1:1, 3:4, 4:3, 9:16, 16:9. |
parameters.personGeneration | string | No | allow_adult | Person generation policy. Supports dont_allow, allow_adult, and allow_all; some regions do not allow allow_all. |
Model-Specific Parameters
| Field | Applicable Models | Default / Range | Description |
|---|---|---|---|
parameters.imageSize | Fast | Default 1K; availability depends on the channel | Fast-version availability depends on the channel. |
parameters.imageSize | Standard / Ultra | Default 1K; supports 1K and 2K | Standard and Ultra support 1K and 2K. |
Example Code
curl "https://api.routescope.ai/v1beta/models/imagen-4.0-generate-001:predict" \
-H "Authorization: Bearer $ROUTESCOPE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"instances": [
{ "prompt": "A premium SaaS API gateway product poster, dark background, crisp typography" }
],
"parameters": {
"sampleCount": 1,
"aspectRatio": "16:9",
"imageSize": "2K",
"personGeneration": "dont_allow"
}
}'Response Structure
Imagen responses use a predictions array. Images are returned through bytesBase64Encoded and mimeType. Do not rewrite them as Gemini candidates or OpenAI data responses.
Notes
- Billing follows the model and channel ratios configured in the backend.
- Fast prioritizes speed. For complex text and high-fidelity posters, prefer Standard or Ultra.
- Imagen 4 outputs include a SynthID watermark.
- Keep
sampleCountcontrolled during batch generation to avoid oversized requests and timeout.
How is this guide?
Last updated on