Skip to main content
google avatar

google / imagen4

Generate high-quality, photorealistic images from a text prompt, with strong prompt adherence, improved in-image text rendering, and up to 2K resolution.

0.04

Model Input

Input

Text description of the image to generate.

The aspect ratio of the generated image.

Additional Settings

Customize your input with more control.

The output resolution. 2K is the same price as 1K.

The file format of the generated image.

How permissive content moderation is, from '1' (strictest) to '6' (most permissive).

Seed for reproducible generation. Leave unset for a random result.

You need to be logged in to run this model and view results.
Log in

Model Output

Output

Generated image output
Generated in 14.667 seconds
Logs (1 lines)

Model Example Requests

Examples

Example output 1Example output 2Example output 3

Model Details

Model Details

Imagen 4 turns a text prompt into a high-quality, photorealistic image. Its strengths are strong prompt adherence (it follows detailed scene descriptions closely), markedly improved in-image text rendering (legible words, signage, and short labels), and crisp detail at up to 2K resolution. It is a general-purpose text-to-image model well suited to product shots, marketing visuals, concept art, and any scene where realism and faithful prompt-following matter. This is the Standard tier — the balanced default for quality and cost.

The only required input is `prompt`. Use `aspect_ratio` to set the frame (`1:1`, `16:9`, `9:16`, `4:3`, `3:4`) and `resolution` to choose `1K` (default) or `2K` output. Output is one generated image returned as a URL.

## Best for - Photorealistic product, lifestyle, and marketing images from a written brief - Scenes that need legible in-image text — short signage, labels, posters, packaging mockups - Detailed prompts where faithful adherence to the described composition matters - High-resolution stills up to 2K for print or large-format use

## Choose another model when - You want to edit, restyle, or extend an existing image rather than generate from text — use an image-to-image or image-editing model - You need motion or animation — use a text-to-video or image-to-video model - You want long passages of perfectly spelled text rendered in the image — even with improved text rendering, dense paragraphs can still degrade - You need many distinct variations in one call — this endpoint returns a single image per request

## Tips - Describe the subject, setting, lighting, lens/feel, and any short text you want rendered explicitly in the prompt - Use `resolution: "2K"` for print or large displays (same price as 1K); keep `1K` for faster, web-sized output - Set framing with `aspect_ratio` (e.g. `16:9` for banners, `9:16` for mobile/social, `1:1` for thumbnails)

## Safety & Content Moderation - `safety_tolerance` (advanced) controls how strict content filtering is, as a string from `"1"` (strictest) to `"6"` (most permissive); the default is `"4"`. Lower it for tighter moderation, raise it only when stricter filtering is rejecting acceptable prompts.

To run via the ModelRunner JavaScript client: ```js import { modelrunner } from "@modelrunner/client";

const result = await modelrunner.subscribe("google/imagen4", { input: { prompt: "a glass coffee mug on a marble counter, soft morning light, the word 'FRESH' on the mug", aspect_ratio: "1:1", resolution: "2K", }, }); ```