Is it possible to generate image as given in input pdf

I like to generate Questions and answers from pdf text where for some questions we may have images while using Claude or Gemini or GPT, and only text is given as a response.

You need to use image generation models to generate image from text, such as DALL-E, Stability AI or Imagen.

Ideally you should use Gemini to generate the image description in the first stage, then use the image model to generate the image from the image description.

P.S. you should probably ask this question in the Gemini API topic.