RawFrame

From Vertex AI (Gemini image)

Move Gemini 2.5 Flash Image calls from Vertex AI generateContent to RawFrame.

On Vertex AI, Gemini image generation is a synchronous generateContent call that returns the image as base64 in the response. On RawFrame it's a generation like any other: create it, wait a few seconds, and download the image from a signed URL.

What changes

  • No Google Cloud setup. No project, no enabled API, no service account or access tokens: one API key.
  • Asynchronous by design. POST /v1/generations returns immediately. Use the SDK's createAndWait / create_and_wait to keep the synchronous feel.
  • Files, not base64. Outputs are stored for you and returned as signed links, so responses stay small.
  • One request shape for this and every other image model.

Requests

Vertex AI generateContentRawFrame
POST .../publishers/google/models/gemini-2.5-flash-image:generateContentPOST https://api.rawframe.dev/v1/generations with model: "google/gemini-2.5-flash-image"
Google OAuth access tokenAuthorization: Bearer <API key>
contents[].parts[] { "text": ... }prompt
contents[].parts[] { "inlineData": { "mimeType", "data" } }an upload in references, role source_image to edit it or reference_image to guide the result
generationConfig.imageConfig.aspectRatioparams.aspect_ratio
generationConfig.seedparams.seed
generationConfig.responseModalitiesNot needed: we always ask for an image.
Other request fieldsprovider_options, passed through as is

Responses

Vertex AIRawFrame
candidates[0].content.parts[].inlineData.data (base64)outputs[0].url: download it
inlineData.mimeTypeoutputs[0].content_type
finishReason such as SAFETY, or promptFeedback.blockReasonstatus: "failed" with error.code: "content_rejected", not charged

Before and after

import { RawFrame } from "@rawframe/sdk";

const rf = new RawFrame();
const image = await rf.generations.createAndWait({
  model: "google/gemini-2.5-flash-image",
  prompt: "A ceramic coffee cup on a sunlit wooden table, product photo",
  params: { aspect_ratio: "1:1" },
});
const png = await (await fetch(image.outputs![0]!.url)).arrayBuffer();

On this page