Skip to main content
POST
/
v3
/
gemini-2.5-flash-image-text-to-image
Gemini 2.5 Flash Image Text-to-Image
curl --request POST \
  --url https://api.highwayapi.ai/v3/gemini-2.5-flash-image-text-to-image \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '
{
  "prompt": "<string>",
  "aspect_ratio": "<string>"
}
'
{
  "image_urls": [
    "<string>"
  ]
}
Generate images from text prompts using the Gemini 2.5 Flash model.

Request Headers

Content-Type
string
required
Enum value: application/json
Authorization
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

prompt
string
required
The text prompt describing the image to generate
aspect_ratio
string
The aspect ratio of the generated image. Available values: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9Optional values: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9

Response Information

image_urls
string[]
required
List of URLs for the generated images