# Google Imagen 4 (no API key) (`jindrich.bar/google-imagen-4`) Actor

Generate photorealistic images with the latest Google Imagen model for text-to-image generation. No need for API key, just use your Apify account.

- **URL**: https://apify.com/jindrich.bar/google-imagen-4.md
- **Developed by:** [Jindřich Bär](https://apify.com/jindrich.bar) (community)
- **Categories:** AI, Developer tools, Other
- **Features:** Limited permissions
- **Stats:** 137 total users, 9 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

from $0.08 / image

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Google Imagen 4 (no API key required)

Generate stunning, high-quality images from text prompts using Google's most advanced image generation model — Imagen 4. This Actor turns any text description into a photorealistic or stylized image in seconds.

Imagen 4 produces images at up to 2K resolution with best-in-class text rendering, making it ideal for generating marketing visuals, product mockups, social media content, concept art, stickers, logos, and more. It accurately follows camera and style directions and renders fine details like fabric textures, water droplets, and animal fur with remarkable realism.

### What can Imagen 4 generate?

Imagen 4 handles an extremely wide range of visual styles and subjects:

**Photorealistic imagery** — landscapes, portraits, product photography, food photography, architecture, interiors, macro close-ups with rich colors and true-to-life textures.

**Artistic styles** — oil paintings with impasto brushstrokes, watercolor botanical illustrations, pixel art, sumi-e ink wash, impressionism, abstract compositions, retro-futuristic designs, and more.

**Text and typography** — unlike most image generation models, Imagen 4 can render readable text directly in images. This makes it uniquely suited for generating comic panels, packaging labels, postage stamps, posters, collectible cards, and any design that combines images with words.

**Logos and stickers** — clean die-cut edges, sharp vector-like output perfect for branding and merchandise.

### Examples

| Prompt | Output |
|--------|--------|
| Prompt: A rolling countryside landscape knitted from yarn fields of green yellow and brown yarn stretch across undulating hills textured stiches \[truncated] | ![](https://lh3.googleusercontent.com/p3cPxXCb2Ysm6wZh6kXHN7-n9a1wGQqmvbPgPCt_osoPtviV3iOXE5MEU1TAuE_YexScQpG8lv0l3A7cK9ZrWH-4bRMoMzbMffbgfiduRA=w2880-h1620-n-nu-rw-lo) |
| Prompt: Extreme macro photograph capturing the breathtaking iridescence of a Blue Morpho butterfly wing, emphasizing abstract beauty and intricate structural marvel. \[truncated] | ![](https://lh3.googleusercontent.com/QntNnmnSqGie9nfFNL-NWI5upJIC6kV8JugTVny1l_knkK-mGdGcF1hMPXH09oAEG19eNzQOXUTweV0xWsgdlVdrq91Ytcxx0gkpv8mzYnSzofFx=w2880-h1620-n-nu-rw-lo) |
| Prompt: A horizontally oriented rectangular stamp features the Mission District's vibrant culture, portrayed in shades of warm terracotta orange \[truncated] | ![](https://lh3.googleusercontent.com/D4RtpFiZNJqangcsC5XuRppmwwdYBfV3Eum_F1kx693AgBvlHKv6dHad3j8O7zppAfLDkET_VjGR_ut-0j9pX7tO1_kwi1ZlYBvPuZPOSVw=w2880-h1620-n-nu-rw-lo) |

### Input

The Actor takes a single required field:

- **prompt** — a text description of the image you want to generate. Be as descriptive as possible — include style, mood, lighting, composition, and subject details for best results.

### Output

The generated image is stored in the Actor's default key-value store under the `OUTPUT` key and is also pushed to the dataset with the prompt and a public image URL.

### Why run Imagen 4 on Apify?

Running Imagen 4 through Apify gives you much more than just an API wrapper — you get a full cloud platform around the model.

**Scheduling** — set up recurring image generation on any cron schedule. Automatically produce daily social media visuals, refresh product mockups every week, or generate batch content on a fixed cadence without writing any orchestration code.

**Integrations** — connect Imagen 4 to the tools you already use. Push generated images directly to Slack, Google Drive, Dropbox, email, or any webhook endpoint. Chain it with other Apify Actors to build end-to-end workflows — for example, scrape product descriptions and then auto-generate matching visuals.

**API & SDKs** — call this Actor programmatically from Python, JavaScript, or any HTTP client. Integrate image generation into your existing apps, pipelines, or internal tools in minutes. The Apify API handles queuing, retries, and result storage for you.

**MCP Server** — this Actor works with the [Apify MCP Server](https://apify.com/apify/actors-mcp-server), so you can call it directly from AI assistants like Claude, ChatGPT, or any MCP-compatible client. Just connect the server and ask your assistant to generate images — no code required.

**Monitoring & storage** — every run is logged with full input/output history. Generated images are persisted in Apify's key-value store and datasets, so you always have a reliable record and can retrieve or share results later.

# Actor input Schema

## `prompt` (type: `string`):

Text prompt describing the image to generate.

## Actor input object example

```json
{}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("jindrich.bar/google-imagen-4").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("jindrich.bar/google-imagen-4").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call jindrich.bar/google-imagen-4 --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jindrich.bar/google-imagen-4"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/IzcjFVhSOfVynu0Rj/builds/VsK1HvsENkYf1VeIS/openapi.json
