What exact formula should go in the data field to properly send binary image to Gemini?
What is the problem & what have you tried?
Hi, I have this Make.com scenario: Twilio WhatsApp webhook → HTTP Download a file (Basic Auth, MediaUrl0) → HTTP Make a request (Gemini API).
Getting error: ‘Unable to process input image INVALID_ARGUMENT’
HTTP Download works fine — Data field shows ff d8 ff (JPEG binary).
What exact formula should go in the Gemini HTTP body’s data field to convert binary to base64?
Model: gemini-2.5-flash, API: v1beta, inline_data”
Yes I tried base64() function but got error: Base64 decoding failed for base64
Also tried replace(Data ; /[\n\r]/g ; “”) — got Unable to process input image
Image size is 138595 bytes (138KB). Content-type: image/jpeg
What exact formula should go in the data field?”
Ok, help me out here. What are you using Gemini for? To analyze the image? Why aren’t you using one of the modules from Gemini App in Make? Have you tried Gemini App - Make an API Call? Is the image going to be reused by another prompt?
We’re not sure about your proficiency level in Make, so it’s easier if you show us what you did with real screenshots, instead of telling. You can be on the right path, but making a simple syntax mistake.
Hi @damato , issue resolved! The problem was I was using fileData instead of inlineData in the JSON body. Changing it to inlineData fixed the error. Thanks for your guidance!