Skip to main content

Documentation Index

Fetch the complete documentation index at: https://runcrate.ai/docs/llms.txt

Use this file to discover all available pages before exploring further.

Google Imagen 4 excels at photorealism, accurate text rendering in images, and complex multi-part prompts. No Google Cloud account required.

Available models

ModelSpeedQualityBest for
Imagen 4.0 PreviewMediumHighGeneral-purpose, balanced
Imagen 4.0 FastFastGoodPrototyping, real-time apps
Imagen 4.0 UltraSlowHighestHero images, print assets

Basic generation

from runcrate import Runcrate

client = Runcrate(api_key="rc_live_YOUR_API_KEY")
image = client.models.generate_image(
    model="google/imagen-4.0-preview",
    prompt="A ceramic coffee mug on a wooden table, morning sunlight through a window, shallow depth of field",
)
image.data[0].save("coffee-mug.png")

Text in images

Imagen 4 renders text inside images more accurately than most diffusion models:
from runcrate import Runcrate

client = Runcrate(api_key="rc_live_YOUR_API_KEY")
image = client.models.generate_image(
    model="google/imagen-4.0-ultra",
    prompt='Neon sign on a brick wall reading "OPEN 24 HOURS" in blue and pink neon, dark alley, rain-slicked pavement',
)
image.data[0].save("neon-sign.png")

Fast tier for real-time apps

import Runcrate from '@runcrate/sdk';

const rc = new Runcrate({ apiKey: 'rc_live_YOUR_API_KEY' });
const image = await rc.models.generateImage({
  model: 'google/imagen-4.0-fast',
  prompt: 'Flat-lay photo of notebook, pen, and coffee cup on white desk',
  aspectRatio: '1:1',
});
await image.save('flatlay.png');

Batch generation

from runcrate import Runcrate
from concurrent.futures import ThreadPoolExecutor

client = Runcrate(api_key="rc_live_YOUR_API_KEY")
scenes = [
    {"file": "hero.png", "prompt": "Person wearing earbuds while jogging at sunrise, editorial photography"},
    {"file": "lifestyle.png", "prompt": "Hands holding smartphone in a cafe, warm tones"},
    {"file": "product.png", "prompt": "Earbuds in charging case on marble, product photography"},
]

def generate(s):
    client.models.generate_image(model="google/imagen-4.0-preview", prompt=s["prompt"], aspect_ratio="16:9").data[0].save(s["file"])

with ThreadPoolExecutor(max_workers=3) as pool:
    pool.map(generate, scenes)

Tips

  • Preview vs Fast vs Ultra. Fast for prototyping, Preview for balanced quality, Ultra for final hero assets.
  • Photorealism. Imagen 4 is photorealistic by default. Adding “photograph” reinforces this.
  • Text rendering. Wrap exact text in quotes within the prompt. Short phrases work best.
  • No Google Cloud needed. One Runcrate API key, standard billing.