Skip to content
Google Gemini AI AP...
 
Notifications
Clear all

Google Gemini AI API Call 2.0 for Image Generation

6 Posts
4 Users
0 Reactions
4 Views
Nio
 Nio
(@nio)
Posts: 2
New Member
Topic starter
 

Does anyone know how to set up the callin.io API Call option within the Gemini API module for image generation? I attempted it this way and received a 404 error.

 
Posted : 10/05/2025 5:47 am
Latest_Ais
(@latest_ais)
Posts: 1
New Member
 

I'm facing the same issue. How can I use the Gemini API for image generation?

 
Posted : 11/05/2025 7:14 pm
Jonathan_Escobar
(@jonathan_escobar)
Posts: 4
New Member
 

Your URL request is incorrect; you forgot to include __:generateContent__
/v1beta/models/gemini-2.0-flash-preview-image-generation:generateContent__

 
Posted : 11/05/2025 11:09 pm
Nio
 Nio
(@nio)
Posts: 2
New Member
Topic starter
 

Good catch. Still erroring though. [404] models/gemini-2.0-flash-preview-image-generation is not found for API version v1beta, or is not supported for generateContent. Call ListModels to see the list of available models and their supported methods.

 
Posted : 12/05/2025 8:16 am
Jonathan_Escobar
(@jonathan_escobar)
Posts: 4
New Member
 

As per the documentation found at Image generation | Gemini API | Google AI for Developers, the supported versions for image generation are:

  • For Gemini, utilize Gemini 2.0 Flash Preview Image Generation.
  • For Imagen, use Imagen 3. Please note that this model is exclusively available on the Paid tier.

This configuration has worked for me.

Could your API key be restricted from generating images?
Replace "GEMINIAPIKEY" with your actual ApiKey and test it.
You can copy the curl code from here: https://aistudio.google.com/app/apikey

 
Posted : 12/05/2025 1:12 pm
DavidGurr_Make
(@davidgurr_make)
Posts: 38
Eminent Member
 

As an alternative, you could use the Google Vertex AI (Gemini) app.

This includes a specific module for Generate an Image, with Gemini 2.0 Flash and Imagen 3 models available.

It utilizes a slightly different underlying Google API. Authentication is handled via OAuth (username and password) instead of an API Key, thus offering enhanced security.

 
Posted : 14/05/2025 3:08 pm
Share: