I

Imagen 3

Image Generation

by Google

Google's state-of-the-art image generation model, available through the Gemini API and Vertex AI. Excels in photorealistic images with SynthID watermarking.

Official APIDocumentationFree: Free (up to 1,500 images/day)

Registration & API Key Steps

1

Get Google AI API Key

Visit Google AI Studio and sign in with your Google account. Generate an API key for free.

Open link
2

Choose API Platform

Use the Gemini Developer API (free tier available) or Vertex AI (pay-as-you-go with GCP billing).

3

Install SDK

Install the Google Generative AI SDK for your preferred language (Python, Node.js, Go, etc.).

4

Start Generating Images

Use Imagen 3 model via the SDK. Images include an invisible SynthID watermark.

Pricing

TierPriceFeatures
Gemini API Free TierFree (up to 1,500 images/day)No credit card required, Up to 45,000 images/month, Full model access
Gemini API Paid (1K/2K)$0.039 / image (1024x1024)1024x1024 or 2048x2048, Higher rate limits, Commercial use
Vertex AI$0.134 / image (1K-2K) or $0.24 (4K)Enterprise features, SLA guarantees, 4K resolution support

Application Tips

Incredibly Generous Free Tier

Google AI Studio free tier offers 1,500 images/day (45,000/month) at no cost. This is the most generous free tier among all image generation APIs.

SynthID Watermark

All images include an invisible SynthID watermark identifying them as AI-generated. This cannot be removed.

Use Gemini 3 Pro for Image Editing

For image editing and manipulation, Gemini 3 Pro Image model supports text-guided image editing in addition to generation.

China Access Solutions

Vertex AI via GCP

Google Cloud Platform is accessible in China for enterprise customers. Apply for Vertex AI access through GCP.

API Proxy

Use a relay server in a supported region to proxy requests to the Gemini API.

Code Example

JavaScript / TypeScript
import { GoogleGenAI } from '@google/genai';

const ai = new GoogleGenAI({ apiKey: process.env.GOOGLE_API_KEY });

async function generateImage() {
  const response = await ai.models.generateImages({
    model: 'imagen-3.0-generate-002',
    prompt: 'A photorealistic image of a golden retriever puppy in a garden',
    config: {
      numberOfImages: 1,
      aspectRatio: '1:1',
    },
  });

  // The response contains base64-encoded image data
  const imageData = response.generatedImages[0].image.imageBytes;
  const buffer = Buffer.from(imageData, 'base64');
  require('fs').writeFileSync('output.png', buffer);
  console.log('Image saved as output.png');
}

generateImage();

Rate Limits

TierLimits
Free Tier1,500 images/day, rate limited
Paid TierHigher limits, contact Google for details

Recommended Use Cases

High-volume image generation (free tier)Enterprise applications via Vertex AIPhotorealistic product imagesContent creation at scaleApplications requiring AI watermarking
Last Updated: 2025-02

Related API Guides