import google.genai as genai
import os

client = genai.Client(api_key=os.environ["GEMINI_API_KEY"])

prompt = """Photorealistic editorial food photograph, 3:4 portrait. Low angle at 15 degrees above a light honey-blonde natural wood cutting board.

Center foreground: a small SQUARE clear glass ramekin filled with dense solid rendered animal fat. The fat is rich golden-yellow like ghee or schmaltz. Its texture is firm and waxy like lard or cold European butter — it holds its shape firmly with visible knife scoop marks: gentle sweeping depressions where a utensil dragged through dense solid fat. The surface has a satiny waxy sheen like polished candle wax, NOT wet or creamy or pourable. The fat is completely opaque, dense, homogeneous — no air bubbles, no grain. It fills the ramekin and the scoop marks show this is a solid that yields to a knife but does not flow or slump.

Behind the ramekin on the same board: a rustic oval artisan multigrain bread boule with golden-brown flour-dusted crust covered in flax and sesame seeds, partially sliced showing airy crumb. A butter knife with sage-green matte handle on the board.

Warm golden side-lighting from left. Shallow depth of field — ramekin tack sharp, bread softly blurred. Natural warm kitchen. No herbs, no garnish. Bon Appetit editorial quality. Shot on Phase One IQ4 medium format camera."""

result = client.models.generate_images(
    model="imagen-4.0-ultra-generate-001",
    prompt=prompt,
    config=genai.types.GenerateImagesConfig(
        number_of_images=2,
        aspect_ratio="3:4",
        output_mime_type="image/png",
    ),
)

for i, img in enumerate(result.generated_images):
    path = f"/root/.openclaw/workspace/phat-visuals/slide11-hero-v4-{i+1}.png"
    img.image.save(path)
    print(f"Saved: {path}")

print("Done — 2 images generated.")
