Gemini 2.5 Flash Image
Google's Gemini 2.5 Flash Image on Vertex AI. Fast text to image, and editing an image with a text instruction.
- Model id:
google/gemini-2.5-flash-image - Type: Image, from Google Vertex AI
- Modes: Text to image, Image edit
- Prompt: up to 8,000 characters
- Canceling: Only while queued. Generations finish within seconds once submitted.
Parameters
Set these in params. Anything left out takes the default, which is what the price estimate assumes.
| Parameter | Accepted values | Default |
|---|---|---|
aspect_ratio | 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 | 1:1 |
num_outputs | 1 only | 1 |
seed | 0 to 4294967295 | chosen by the provider |
output_format | png, jpeg, webp | provider's |
References
Pass media in references, each with a role and an upload_id or HTTPS url (Uploads). When mode is left out it is inferred from the roles.
| Role | Used as | At most |
|---|---|---|
source_image | Image to edit | 1 |
reference_image | Subject or style reference | 3 |
Pricing
Billed per image delivered. The full price list for your account is on the dashboard's billing page and in pricing from GET /v1/models/google%2Fgemini-2.5-flash-image. Each request reserves its maximum price and is charged for what was produced (Pricing and credits).
Examples
Text to image
import { RawFrame } from "@rawframe/sdk";
const rf = new RawFrame();
const generation = await rf.generations.createAndWait({
model: "google/gemini-2.5-flash-image",
prompt: "A ceramic coffee cup on a sunlit wooden table, soft shadows, product photo",
params: { aspect_ratio: "1:1" },
});
console.log(generation.outputs?.[0]?.url);Wide banner
import { RawFrame } from "@rawframe/sdk";
const rf = new RawFrame();
const generation = await rf.generations.createAndWait({
model: "google/gemini-2.5-flash-image",
prompt: "A watercolor skyline of a coastal city at dawn, pastel colors, lots of empty sky",
params: { aspect_ratio: "16:9" },
});
console.log(generation.outputs?.[0]?.url);Seedream 5.0 Pro
ByteDance's Seedream 5.0 Pro through BytePlus ModelArk. Text to image and editing of one input image at 1K, 1.5K or 2K. Aspect ratio is described in the prompt.
Gemini Nano Banana 2.1
Google's Gemini Nano Banana 2.1 on Vertex AI. Text to image up to 4K, and editing with up to fourteen input images.