> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jiekou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini 2.5 Flash Image 文生图

使用 Gemini 2.5 Flash 模型根据文字提示生成图像。

## 请求头

<ParamField header="Content-Type" type="string" required={true}>
  枚举值: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer 身份验证格式: Bearer \{\{API 密钥}}。
</ParamField>

## 请求体

<ParamField body="prompt" type="string" required={true}>
  描述要生成图像的文字提示
</ParamField>

<ParamField body="aspect_ratio" type="string">
  生成图像的宽高比。可用值：1:1、3:2、2:3、3:4、4:3、4:5、5:4、9:16、16:9、21:9

  可选值：`1:1`, `3:2`, `2:3`, `3:4`, `4:3`, `4:5`, `5:4`, `9:16`, `16:9`, `21:9`
</ParamField>

## 响应信息

<ResponseField name="image_urls" type="string[]" required={true}>
  生成图像的 URL 列表
</ResponseField>
