Gemini 图片
gemini-3.1-flash-image-preview——出图快、擅长多图合成(已实测)
gemini-3.1-flash-image-preview 是出图很快的图片模型,最擅长多参考图合成——最多可传 14 张
image_urls,适合把多个主体、风格或商品融合到一张图里。异步任务,提交后轮询查状态。
已实测:下面示例为对
api.aiclonevoicefree.com的真实调用。 接口:POST /api/v2/image/generate| 鉴权:Authorization: Bearer sk_...
请求
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
prompt | string | ✅ | 文本提示词 |
model | string | ✅ | gemini-3.1-flash-image-preview |
size | string | ⬜ | 1:1(默认)/ 16:9 / 9:16 |
image_urls | string[] | ⬜ | 参考图,最多 14 张 |
seed | int | ⬜ | 随机种子 |
curl -X POST https://api.aiclonevoicefree.com/api/v2/image/generate \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "一只柴犬在樱花树下,电影感",
"model": "gemini-3.1-flash-image-preview",
"size": "16:9"
}'响应 202
{ "task_id": "273e36005d4f40209ba92a48567a5db4", "status": "pending", "capability": "image", "action": "generate", "model": "gemini-3.1-flash-image-preview" }多参考图合成——最多 14 张:
curl -X POST https://api.aiclonevoicefree.com/api/v2/image/generate \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"prompt": "把三件商品摆在大理石桌面上,影棚打光",
"model": "gemini-3.1-flash-image-preview",
"image_urls": ["https://example.com/a.png", "https://example.com/b.png", "https://example.com/c.png"]
}'取结果
轮询 GET /api/v2/tasks/{task_id},完成时(下面是上面那次实测的真实结果):
{
"status": "completed",
"capability": "image",
"_type": "image.generate",
"imageUrl": "https://upload.apib.ai/f/image/...0.png"
}计费
每张固定 3 视频积分——与 size、参考图数量无关,n 固定为 1。
算例:生成 1 张图,哪怕带 14 张参考图 = 3 积分。
完成结算、失败自动退款(见通用约定)。用的是视频积分。