nano-banana-2 について
inference.sh CLI から Google Gemini 3.1 Flash Image Preview を使って画像を生成・編集するスキルです。複数枚の出力、アスペクト比や解像度の指定、Google Search grounding に対応します。
主な機能
- 01プロンプトから画像を生成
- 02入力画像を使った編集
- 03出力数とアスペクト比の指定
- 041K、2K、4K の解像度選択
- 05Google Search grounding の有効化
活用シーン
- 01製品やコンセプトの画像作成
- 02構図を変えた画像バリエーションの生成
- 03既存画像の内容変更
- 04最新情報に基づくビジュアル作成
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ magentosh/ superpowers --skill nano-banana-2インストール後、Claude Code で/nano-banana-2を入力して読み込まれたか確認します。
詳細
belt CLI スキルをインストールする:
npx skills add belt-sh/cli
Nano Banana 2 - Gemini 3.1 Flash Image Preview
inference.sh CLI を使って、Google Gemini 3.1 Flash Image Preview で画像を生成します。
クイックスタート
inference.sh CLI(
belt)が必要です。インストール手順
belt login
belt app run google/gemini-3-1-flash-image-preview --input '{"prompt": "a banana in space, photorealistic"}'
使用例
基本的なテキストから画像への生成
belt app run google/gemini-3-1-flash-image-preview --input '{
"prompt": "A futuristic cityscape at sunset with flying cars"
}'
複数の画像
belt app run google/gemini-3-1-flash-image-preview --input '{
"prompt": "Minimalist logo design for a coffee shop",
"num_images": 4
}'
カスタムアスペクト比
belt app run google/gemini-3-1-flash-image-preview --input '{
"prompt": "Panoramic mountain landscape with northern lights",
"aspect_ratio": "16:9"
}'
画像編集(入力画像を使用)
belt app run google/gemini-3-1-flash-image-preview --input '{
"prompt": "Add a rainbow in the sky",
"images": ["https://example.com/landscape.jpg"]
}'
高解像度(4K)
belt app run google/gemini-3-1-flash-image-preview --input '{
"prompt": "Detailed illustration of a medieval castle",
"resolution": "4K"
}'
Google 検索によるグラウンディング
belt app run google/gemini-3-1-flash-image-preview --input '{
"prompt": "Current weather in Tokyo visualized as an artistic scene",
"enable_google_search": true
}'
入力オプション
| パラメーター | 型 | 説明 |
|---|---|---|
prompt | string | 必須。 生成または変更する内容 |
images | array | 編集用の入力画像(最大14枚)。対応形式:JPEG、PNG、WebP |
num_images | integer | 生成する画像の数 |
aspect_ratio | string | 出力比率:"1:1"、"16:9"、"9:16"、"4:3"、"3:4"、"auto" |
resolution | string | "1K"、"2K"、"4K"(デフォルト:1K) |
output_format | string | 画像の出力形式 |
enable_google_search | boolean | リアルタイム情報によるグラウンディングを有効にします(天気、ニュースなど) |
出力
| フィールド | 型 | 説明 |
|---|---|---|
images | array | 生成または編集された画像 |
description | string | モデルによるテキストの説明または応答 |
output_meta | object | 料金計算用の入力/出力に関するメタデータ |
プロンプトのヒント
スタイル:フォトリアリスティック、イラスト、水彩画、油絵、デジタルアート、アニメ、3D レンダリング
構図:クローズアップ、ワイドショット、空撮、マクロ、ポートレート、風景
照明:自然光、スタジオ照明、ゴールデンアワー、ドラマチックな影、ネオン
詳細:質感、色、雰囲気、空気感について具体的な詳細を追加します
ワークフローの例
# 1. Generate sample input to see all options
belt app sample google/gemini-3-1-flash-image-preview --save input.json
# 2. Edit the prompt
# 3. Run
belt app run google/gemini-3-1-flash-image-preview --input input.json
Python SDK
from inferencesh import inference
client = inference()
# Basic generation
result = client.run({
"app": "google/gemini-3-1-flash-image-preview@0c7ma1ex",
"input": {
"prompt": "A banana in space, photorealistic"
}
})
print(result["output"])
# Stream live updates
for update in client.run({
"app": "google/gemini-3-1-flash-image-preview@0c7ma1ex",
"input": {
"prompt": "A futuristic cityscape at sunset"
}
}, stream=True):
if update.get("progress"):
print(f"progress: {update['progress']}%")
if update.get("output"):
print(f"output: {update['output']}")
関連スキル
# Original Nano Banana (Gemini 3 Pro Image, Gemini 2.5 Flash Image)
npx skills add inference-sh/skills@nano-banana
# Full platform skill (all apps)
npx skills add inference-sh/skills@infsh-cli
# All image generation models
npx skills add inference-sh/skills@ai-image-generation
すべての画像アプリを表示:belt app list --category image
ドキュメント
- アプリの実行 - CLI からアプリを実行する方法
- 結果のストリーミング - リアルタイムの進捗状況の更新
- ファイルの処理 - 画像の操作
コメント
Markdown 対応