クイックスタート

Nano Banana Pro APIを数分で使い始めましょう

1. APIキーを取得する

アカウントにサインインし、APIキーページに移動して新しいAPIキーを作成してください。

2. 残高を確認する
curl https://gateway.nanobananapro.site/api/v1/account/balances \
  -H "Authorization: Bearer sk-your-api-key"
3. 最初の画像を生成する
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-pro",
    "prompt": "A beautiful sunset over mountains",
    "aspect_ratio": "16:9"
  }'

返信:

{
  "success": true,
  "data": {
    "task_id": "task_abc123",
    "credits_used": 6,
    "remaining_credits": 494
  }
}
4. タスクのステータスを確認
curl https://gateway.nanobananapro.site/api/v1/images/task_abc123 \
  -H "Authorization: Bearer sk-your-api-key"

返信:

{
  "success": true,
  "data": {
    "task_id": "task_abc123",
    "status": "completed",
    "image_url": "https://cdn.example.com/image.png"
  }
}
完全なコード例
様々なプログラミング言語での完全な動作コード例
Nano Banana Pro API