Skip to content

Image Generation​

POST
/v1beta/models/{modeName}:generateContent
  • Gemini native generateContent image generation endpoint
  • Path parameter modeName specifies the model (e.g. gemini-2.5-flash-image-preview)
  • Supports text-to-image, image-to-image, and multi-image compositing
  • Set aspect ratio and resolution via generationConfig.imageConfig
  • Official docs: Image generation

Authorizations​

bearer
Type
HTTP (bearer)

Request Body​

application/json
object
object[]
Required
object

Generation configuration

Responses​

Success

application/json

Playground​

Authorization
Variables
Key
Value
Body

Samples​