Image Studio, Image Edits API & More

A dedicated Image Studio in the Playground for gallery-based generation with multi-model comparison, an OpenAI-compatible /v1/images/edits endpoint, and a wave of image generation improvements.

Image Studio in the Playground comparing generations across Gemini 3.1 Flash Image, Gemini 3 Pro Image, and Qwen Image side by side

Image Studio

The Playground now has a dedicated Image Studio at /image — a gallery-based UI purpose-built for image generation workflows rather than conversational chat.

Multi-Model Comparison

Toggle Compare mode to select up to 3 image models and generate from all of them in parallel. Results appear side by side so you can instantly evaluate quality, style, and consistency across providers.

  • Full prompt controls: aspect ratio, resolution, pixel dimensions, and image count (1–4)
  • Results appear newest-first in a scrollable gallery
  • Click any image to zoom, hover to download
  • Recent prompts saved in the sidebar for quick re-use
  • Suggestion prompts to get started with one click

Supported Models

Image Studio works with every image generation model on LLM Gateway, including Gemini 3.1 Flash Image, Gemini 3 Pro Image, Qwen Image, Seedream, CogView, and more.

Try it now


AI SDK Provider: generateImage() Support

Our @llmgateway/ai-sdk-provider now supports the Vercel AI SDK's generateImage() function. Use llmgateway.image() to get an image model:

1import { createLLMGateway } from "@llmgateway/ai-sdk-provider";
2import { generateImage } from "ai";
3import { writeFileSync } from "fs";
4
5const llmgateway = createLLMGateway({
6 apiKey: process.env.LLM_GATEWAY_API_KEY,
7});
8
9const result = await generateImage({
10 model: llmgateway.image("gemini-3-pro-image-preview"),
11 prompt:
12 "A cozy cabin in a snowy mountain landscape at night with aurora borealis",
13 size: "1024x1024",
14 n: 1,
15});
16
17result.images.forEach((image, i) => {
18 const buf = Buffer.from(image.base64, "base64");
19 writeFileSync(`image-${i}.png`, buf);
20});

OpenAI-Compatible Image APIs

/v1/images/generations

A fully OpenAI-compatible endpoint for image generation. Use the same request format you already know:

1curl -X POST "https://api.llmgateway.io/v1/images/generations" \
2 -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "model": "gemini-3-pro-image-preview",
6 "prompt": "A futuristic city at sunset",
7 "n": 1,
8 "size": "1024x1024"
9 }'

/v1/images/edits

Edit existing images with a new dedicated endpoint — send an image and a prompt describing the changes you want:

1curl -X POST "https://api.llmgateway.io/v1/images/edits" \
2 -H "Authorization: Bearer $LLM_GATEWAY_API_KEY" \
3 -F "model=gemini-3-pro-image-preview" \
4 -F "prompt=Make it nighttime with neon lights" \
5 -F "image=@photo.png"

Both endpoints support the aspect_ratio parameter for controlling output dimensions.

Read the full image generation docs for all parameters, model-specific configuration, and more examples.


Gemini 3.1 Flash Image Preview

Added Gemini 3.1 Flash Image Preview — Google's latest fast image generation model with support for 0.5K, 1K, 2K, and 4K resolutions.


More Improvements

  • Image generation in chat: Smarter detection of vision vs image generation mode — attaching images now correctly triggers vision, while text-only prompts trigger image generation
  • Aspect ratio support: Added aspect_ratio parameter across all image generation endpoints
  • URL-based images: Image generation responses now correctly handle URL-based image references
  • IAM enforcement: deny_providers rules are now correctly enforced during provider routing
  • Google AI schema fix: Unsupported schema properties are now stripped before forwarding to Google AI