In the prompt for Gemini api, I am adding some images and prompt text. I wanted gemini to return based on the prompt and appropriately place the images within the text. Eventhough it is able to recognise the request and try to add images, its not the original image I supplied it with. It returns imgur links which does not load either. It is placing blank imgur images where it should have placed the original images I supplied it with.
Without seeing the exact prompt youâre using, this isnât too much of a surprise.
Geminiâs API produces text as an output. And when it processes the input, it processes any images as a series of tokens. It cannot reproduce the image output based on the input.
Some of it may depend on how youâre doing the prompting. For example, you may need to specify things like âYou should reference the following image as âImage Aâ.â and later âWhen you feel an image should be included, reference it by the names I provided above in this format: [ImageA]â. (I havenât tested with these - you should experiment.)
Welcome to the forum.
One addition to the comments above: the Imgur API has URIâs that refer to content in locations other than Google cloud. URIâs not in Google cloud will not work with the Gemini API. You should look into the File API. Even then, you wonât get Gemini generating mixed-media content; the part about using the File API is so that Gemini will at least be able to âseeâ the images you give it.