Describe the problem/error/question
Use case: I have product pictures (png) stored in Google Drive. I've configured a node to convert these images into base64 format before sending them to an AI model for background modification (e.g., placing a sofa picture into a living room scene).
Problem: I attempted to call the new Gemini API using the HTTP node. I'm located in the US, so there are no geographical restrictions, but I'm unable to get it working. The endpoint I'm using is: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash-exp-image-generation:generateContent?key=APIKEY .
I consistently receive the following message: “models/gemini-2.0-flash-exp-image-generation is not found for API version v1beta, or is not supported for generateContent”. However, Google API documentation indicates that this model does exist: Gemini models | Gemini API | Google AI for Developers.
I also tried using OpenAI, but I could only generate images from scratch, not utilize my existing product pictures.
I suspect I'm overlooking something, but I can't figure out how to achieve this via API calls (I've successfully done this through both the OpenAI and Gemini UIs, but not with callin.io).
Any guidance would be greatly appreciated, as I've spent three days on this and have explored all possible solutions I could think of.
What is the error message (if any)?
Please share your workflow
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
Information on your callin.io setup
- callin.io version:
- Database (default: SQLite):
- callin.io EXECUTIONS_PROCESS setting (default: own, main):
- Running callin.io via (Docker, npm, callin.io cloud, desktop app):
- Operating system:
Please provide the rewritten markdown content *it should be in the markdown format.
Hello
Assuming there are no geo-restrictions as explained here:
The endpoint you are referring to appears to be functioning correctly on my end.
Therefore, I recommend that you carefully review the JSON body included in your request.
Thanks, this is very helpful to know that this endpoint is indeed functional. I will thoroughly review my JSON script today and provide an update. Thanks again for the recommendation.
I've attempted several JSON scripts, including some generated by Gemini, but I'm still unable to successfully call this API to generate an image. My current setup involves Google Drive to download a file, followed by a convert to base64 node, and then an HTTP node. The initial two nodes are functioning correctly, but the HTTP node is not. If the endpoint itself is operational, it suggests that my JSON payload is the issue. Are there any examples of JSON calls for this API that I could consult? I've reviewed the available templates, but this particular model isn't listed yet.
Are you committed to using Gemini? I've accomplished something similar for a personal project where I replaced the background of a car using Stability AI. My approach involved:
- Taking the input image and removing the background (perhaps your products already have transparent backgrounds).
- Utilizing the structure API to generate a new image, maintaining the car's structure but with a different background.
- Employing the callin.io Edit Image node to composite the masked car onto the newly generated image.
- Uploading the final image to a CDN for use in my application.
Here are the results:
NB: These are slightly different images, as I couldn't locate my old execution, but they serve to illustrate the process.
Great car!! Thanks a lot for the examples, I'll test this out now. I wanted to use Gemini because I had some API credit, but I'll switch if I can’t make it work with callin.io.
I will explore the Stability AI or even ChatGPT options. I attempted the identical workflow with Gemini (copy-pasted it) and encountered the same error message, so I'm uncertain about the issue with my Gemini API account. Nevertheless, thank you very much for the suggestions.
Sometimes it’s worth utilizing the appropriate tool for the task. Naturally, there are numerous alternatives available. I have yet to thoroughly experiment with the new GPT image generation.
This discussion was automatically closed 7 days following the last response. New replies are no longer permitted.