[▲ Vercel Community](/) · [Categories](/categories) · [Latest](/latest) · [Top](/top) · [Live](/live)

[AI SDK](/c/ai-sdk/62)

# How can I edit an image using `gemini-3-pro-image` with AI Gateway?

315 views · 0 likes · 3 posts


Lucas Rodrigues (@lusrodri) · 2025-12-17

I have been seeing the doc and I had only find the below example. Someone knows how to get it?

```javascript
import { generateText } from 'ai';
import 'dotenv/config';
 
async function main() {
  const result = await generateText({
    model: 'google/gemini-3-pro-image',
    prompt: `Create a detailed illustration of a turquoise-throated puffleg hummingbird resting on a branch covered with dew at sunrise`,
  });
 
  // Print any text response from the model
  if (result.text) {
    console.log(result.text);
  }
 
  // Images are available in result.files
  console.log(`Generated ${result.files.length} image(s)`);
  console.log('Usage:', JSON.stringify(result.usage, null, 2));
}
 
main().catch(console.error);
```


Amy Egan (@amyegan) · 2025-12-17

Can you tell us more about what you're trying to do and what's not working the way you expect?

This other post has some suggestions about what kind of info is helpful to share:
https://community.vercel.com/t/how-to-get-good-answers/158


Amy Egan (@amyegan) · 2026-01-23

Hey @lusrodri! 😊 Just wanted to check in and see if you still need help with editing an image using `gemini-3-pro-image`. If you’ve found a solution or if there's anything specific that's still unclear, let’s figure this out together!