生成费用
$0.013 / 张图
图像模型
加速队列,适用于快速预览、创意 A/B 测试和批量生成场景。
API 状态:开发中
生成费用
$0.013 / 张图
请求限制
140 QPS
计费类型
按生成次数计费
更新时间
2026-03-11
Endpoint: /v1/images/generations
Method: POST
Authorization: `Authorization: Bearer $APISTOR_API_KEY`
错误类型: /errors
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| model | string | 是 | 模型目录中的 ID(例如 nanobanano-2)。 |
| prompt | string | 是 | 用于图像生成的文本提示词。 |
| size | string | 否 | 输出尺寸:1024x1024、2048x2048、4096x4096。 |
| n | number | 否 | 单次请求生成图片数量。 |
| format | string | 否 | 返回格式:url 或 b64_json。 |
请求示例 (cURL)
curl -X POST "https://api.apistor.io/v1/images/generations" \
-H "Authorization: Bearer $APISTOR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-fast",
"prompt": "High-quality ecommerce hero image of a futuristic banana product, soft studio light",
"size": "1024x1024",
"n": 1,
"format": "url"
}'响应示例 (JSON)
{
"id": "gen_01JY7B5Q2P9T2M9A12KJ3R4L2V",
"model": "nano-banana-fast",
"status": "completed",
"price": "$0.013 / 张图",
"output": [
{
"url": "https://cdn.apistor.io/output/image_01JY7B5Q.webp",
"width": 1024,
"height": 1024
}
],
"created_at": "2026-03-17T10:25:11Z"
}面向生产环境的集成能力(webhooks、idempotency keys、SDK)将在下一阶段补齐。
打开错误目录