ナノバナナ2
高速な画像生成を実現。テキストから画像への生成、および画像から画像への変換に対応。
機能
- テキストから画像生成
- 画像から画像への変換
- 複数のアスペクト比
- 高速生成(約5秒)
料金設定
4 (~$0.04)Per image
エンドポイント
POST
/api/v1/images/generateパラメータ
| パラメータ | タイプ | 必須 | 説明 |
|---|---|---|---|
| model | string | 必須 | Must be "nano-banana" |
| prompt | string | 必須 | Text description of the image to generate |
| negative_prompt | string | オプション | What to avoid in the image |
| aspect_ratio | string | オプション | "1:1", "16:9", "9:16", "4:3", "3:4" |
| input_image | string | オプション | URL or base64 for image-to-image |
| num_images | number | オプション | Must be 1 |
リクエストの例
{
"model": "nano-banana",
"prompt": "A futuristic city at night with neon lights",
"aspect_ratio": "16:9"
}レスポンス例
{
"success": true,
"data": {
"task_id": "task_abc123",
"credits_used": 4,
"remaining_credits": 496,
"model": "nano-banana"
}
}コード例
curl -X POST https://gateway.nanobananapro.site/api/v1/images/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana",
"prompt": "A futuristic city at night with neon lights",
"aspect_ratio": "16:9"
}'