Image generation¶
Text → image, tri-parity across Azure / GCP / AWS. Same discipline as every earlier recipe: verified model IDs, one dispatch function, deploy composes E1.
The pipeline¶
┌────────────┐ ┌──────────────┐ ┌─────────────┐
│ prompt │──► │ text→image │──► │ image bytes │
│ (text) │ │ (per cloud) │ │ (PNG/JPEG) │
└────────────┘ └──────────────┘ └─────────────┘
No LLM in the middle. The point here is the model catalog + request shape per cloud.
Per-cloud services¶
| Cloud | Service | Default model | Package |
|---|---|---|---|
| Azure | Azure OpenAI Images | gpt-image-1 |
openai (same SDK as chat) |
| GCP | Vertex AI Imagen | imagen-4.0-generate-001 |
google-genai (same SDK as chat) |
| AWS | Bedrock — Amazon Nova Canvas | amazon.nova-canvas-v1:0 |
boto3 bedrock-runtime |
The GCP and Azure paths reuse the exact SDK you set up in Call an LLM — only the method changes (images.generate on Azure, models.generate_images on Vertex). AWS is a different Bedrock model id but the same invoke_model shape as embeddings.
Docs verified 2026-08-08¶
- Azure OpenAI image generation — learn.microsoft.com/…/openai/how-to/dall-e
- Vertex Imagen — ai.google.dev/gemini-api/docs/imagen
- Bedrock Nova Canvas overview — docs.aws.amazon.com/nova/…/image-generation
- Bedrock Nova Canvas request/response — docs.aws.amazon.com/nova/…/image-gen-req-resp-structure
Model catalog snapshot¶
| Provider | Model IDs (verified) | Notes |
|---|---|---|
| Azure OpenAI | gpt-image-2 (GA), gpt-image-1.5, gpt-image-1, gpt-image-1-mini |
DALL-E-3 retired 2026-03-04. Sizes: 1024×1024, 1024×1536, 1536×1024 (GPT-Image-1 family); GPT-Image-2 accepts arbitrary sizes with 16-px multiple + long edge ≤ 3840 px. |
| Vertex Imagen | imagen-4.0-generate-001, imagen-4.0-fast-generate-001, imagen-4.0-ultra-generate-001, imagen-3.0-generate-002 |
Aspect ratios: 1:1, 3:4, 4:3, 9:16, 16:9. Imagen shuts down 2026-08-17 on the Gemini Developer API — Nano Banana 2 (gemini-3.1-flash-image) is the current migration target; Nano Banana Pro (gemini-3-pro-image) is the studio-quality tier. Original Nano Banana (gemini-2.5-flash-image) remains GA. |
| Bedrock | amazon.nova-canvas-v1:0 |
Nova Canvas covers T2I + editing (inpainting/outpainting/background removal/virtual try-on/color-guided/image conditioning/image variation). Max 2048×2048 (or 2816×1536) for generation. |
Pages¶
- Generate — one call per cloud, verified request shapes, returns image bytes.
- Deploy — Terraform composing E1 baseline + per-cloud image-service resources (IAM for Bedrock Nova Canvas; no per-cloud API enable needed for Azure OpenAI / Vertex Imagen since they run on the same accounts as chat).
Validate-only¶
Same discipline as every prior batch — no live image generation in CI. The "verify" block on the Generate page has the local one-liner.