Documentation Index
Fetch the complete documentation index at: https://docs.toapis.com/llms.txt Use this file to discover all available pages before exploring further.
Gemini-2.5-Flash 图像生成
使用 Google Gemini 2.5 Flash 模型生成图像,快速高效
- Google Gemini 2.5 Flash 高效图像生成模型 (Nano banana)
- 通过 model 参数选择
gemini-2.5-flash-image-preview模型 - 支持文本到图像生成
- 异步任务管理,通过任务 ID 查询结果
Authorizations
Body
图像生成模型名称可用模型别名:
nano-banana示例:"gemini-2.5-flash-image-preview"图像生成的文本描述最长 1000 个字符
图像生成的尺寸比例支持的格式:
| 值 | 说明 | 像素(参考) |
|---|---|---|
1:1 | 正方形 | 1024x1024 |
16:9 | 横向宽屏 | 1792x1024 |
9:16 | 竖向长图 | 1024x1792 |
4:3 | 横向标准 | 1365x1024 |
3:4 | 竖向标准 | 1024x1365 |
3:2 | 横向相片 | 1536x1024 |
2:3 | 竖向相片 | 1024x1536 |
生成图像的数量固定为 1⚠️ 注意: 必须是纯数字(如
1),不要加引号,否则会报错参考图像 URL 列表,用于图生图或图像编辑限制: 最多 14 张图片
元数据参数,用于传递额外的配置选项
Response
任务唯一标识符,用于查询任务状态
对象类型,固定为
generation.task使用的模型名称
任务状态
queued- 排队等待处理in_progress- 处理中completed- 成功完成failed- 失败
任务进度百分比(0-100)
任务创建时间戳(Unix 时间戳)
任务元数据