Menu
Important
Stay updated on React2Shell

Image Generation with OpenAI-Compatible API

Last updated November 25, 2025

AI Gateway supports image generation using the OpenAI-compatible API. You can generate images using multimodal LLMs or dedicated image generation models.

You can view all available models that support image generation by using the Image filter at the AI Gateway Models page.

For AI SDK usage with image generation capabilities, see the AI SDK documentation.

Multimodal LLMs like Nano Banana, Nano Banana Pro, and GPT-5 variants can generate images alongside text using the endpoint. Images are returned in the response's array.

For streaming requests, images are delivered in delta chunks:

Dedicated image generation models use the OpenAI Images API () for specialized image creation.

Google's Imagen models provide high-quality image generation with fine-grained control. Multiple models are available including and .

View available Imagen provider options for configuration details.

Black Forest Labs' Flux models offer advanced image generation with various capabilities. Multiple models are available including but not limited to:

View available Black Forest Labs provider options for configuration details.

You can use the OpenAI Python client to generate images with the AI Gateway. This example demonstrates a complete workflow including error handling, image saving, and metadata display:

You can also use the OpenAI Images API directly via REST without a client library:


Was this helpful?

supported.