Blank imgur images within the gemini response text

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.

1 Like

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.)

1 Like

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.