Logo: Nano Banana

Nano Banana

Organisatioun
okou-ai
nano-banana

Google Gemini image generation (Nano Banana) via the Gemini API. Use when user mentions "Nano Banana", "Gemini image generation", "gemini-3-pro-image", "gemini-3.1-flash-image", or wants to generate/edit images with Google's native image model.

Iwwersiicht

Editeurokou-ai
Repositoryokou-skills
Skill-Nummnano-banana
Stären
81
Forks
19
Matgeliwwert Dateien
Nëmmen Instruktiounen
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    okou-ai huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Nano Banana an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/okou-ai/okou-skills/tree/main/nano-banana
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/okou-ai/okou-skills.git /tmp/okou-skills
mkdir -p .claude/skills
cp -r /tmp/okou-skills/nano-banana .claude/skills/nano-banana
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Nano Banana an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Nano Banana automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Nano Banana net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Nano Banana (Gemini Image Generation)

Generate and edit images using Google's Gemini native image models. Supports text-to-image, image editing, and multi-image composition via the standard generateContent endpoint.

Official docs: https://ai.google.dev/gemini-api/docs/generate-content/image-generation


When to Use

Use this skill when you need to:

  • Generate images from text prompts
  • Edit an existing image with a text instruction (inpaint / restyle / add-remove)
  • Compose multiple input images into one output (e.g. put a product into a scene)
  • Iterate on an image conversationally with fine-grained control

Prerequisites

Connect the Nano Banana connector at app.okou.ai/connectors. Enabling the connector provisions NANO_BANANA_TOKEN — no Google Cloud account or user-supplied key is required.

Troubleshooting: If requests fail, run okou doctor check-connector --env-name NANO_BANANA_TOKEN or okou doctor check-connector --url https://generativelanguage.googleapis.com/v1beta/models/gemini-3.1-flash-image:generateContent --method POST


How to Use

All calls hit POST https://generativelanguage.googleapis.com/v1beta/models/<model>:generateContent with header x-goog-api-key: $NANO_BANANA_TOKEN. The output image comes back Base64-encoded in candidates[0].content.parts[*].inline_data.data — see section 3 for picking the right part.

1. Text-to-Image (Flash — fast, versatile default)

Write to /tmp/nano_banana_request.json:

json
{
  "contents": [
    {
      "parts": [
        { "text": "A golden retriever puppy wearing a tiny chef hat, studio lighting, photorealistic" }
      ]
    }
  ]
}
bash
curl -s -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-3.1-flash-image:generateContent" --header "x-goog-api-key: $NANO_BANANA_TOKEN" --header "Content-Type: application/json" -d @/tmp/nano_banana_request.json > /tmp/nano_banana_response.json

2. Text-to-Image (Pro — highest quality)

bash
curl -s -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-image:generateContent" --header "x-goog-api-key: $NANO_BANANA_TOKEN" --header "Content-Type: application/json" -d @/tmp/nano_banana_request.json > /tmp/nano_banana_response.json

3. Extract and Save the Image

Gemini 3 image models think before they answer, and the thinking is returned inline: up to two interim images come back as parts marked "thought": true, followed by the final render. Take the last image part that is not a thought — selecting every image part concatenates the interim frames into a corrupt file.

bash
jq -r '[ .candidates[0].content.parts[]
         | select((.thought // false) | not)
         | (.inlineData // .inline_data)
         | select(. != null) ]
       | last | .data // empty' /tmp/nano_banana_response.json | base64 -d > /tmp/nano_banana_output.png

If generation was refused or safety-blocked there is no image part at all, and the command above writes an empty file. Check the size before using the output, and read candidates[0].finishReason and the text parts to find out why.

4. Edit an Existing Image (Image-to-Image)

Pass the input image as a second part. Use a local file or URL → Base64:

bash
base64 -w0 /path/to/input.jpg > /tmp/nano_banana_input_b64.txt

Write to /tmp/nano_banana_request.json:

json
{
  "contents": [
    {
      "parts": [
        { "text": "Replace the background with a snowy mountain range at sunset. Keep the subject unchanged." },
        {
          "inline_data": {
            "mime_type": "image/jpeg",
            "data": "<PASTE_CONTENTS_OF_/tmp/nano_banana_input_b64.txt>"
          }
        }
      ]
    }
  ]
}

Or build the JSON with jq to avoid pasting:

bash
jq -n --rawfile img /tmp/nano_banana_input_b64.txt '{
  contents: [{
    parts: [
      { text: "Replace the background with a snowy mountain range at sunset. Keep the subject unchanged." },
      { inline_data: { mime_type: "image/jpeg", data: $img } }
    ]
  }]
}' > /tmp/nano_banana_request.json
bash
curl -s -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-3.1-flash-image:generateContent" --header "x-goog-api-key: $NANO_BANANA_TOKEN" --header "Content-Type: application/json" -d @/tmp/nano_banana_request.json > /tmp/nano_banana_response.json

5. Multi-Image Composition

Combine multiple input images into one output — e.g. put a product (image A) into a scene (image B):

bash
jq -n \
  --rawfile a /tmp/product_b64.txt \
  --rawfile b /tmp/scene_b64.txt \
  '{
    contents: [{
      parts: [
        { text: "Place the product from the first image onto the wooden table in the second image. Match the lighting and shadows." },
        { inline_data: { mime_type: "image/png", data: $a } },
        { inline_data: { mime_type: "image/jpeg", data: $b } }
      ]
    }]
  }' > /tmp/nano_banana_request.json

curl -s -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-image:generateContent" --header "x-goog-api-key: $NANO_BANANA_TOKEN" --header "Content-Type: application/json" -d @/tmp/nano_banana_request.json > /tmp/nano_banana_response.json

Gemini 3 models mix up to 14 reference images, but the per-model budget differs by role:

Reference rolegemini-3.1-flash-lite-imagegemini-3.1-flash-imagegemini-3-pro-image
Objects (high fidelity)14106
Characters (consistency)—45
Style references——3

6. Control Output Modalities and Aspect Ratio

Gemini can return text alongside images. To request image-only output and a specific aspect ratio, add generationConfig:

json
{
  "contents": [
    { "parts": [{ "text": "A minimalist poster for a jazz festival" }] }
  ],
  "generationConfig": {
    "responseModalities": ["IMAGE"],
    "imageConfig": {
      "aspectRatio": "16:9",
      "imageSize": "2K"
    }
  }
}
bash
curl -s -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-3.1-flash-image:generateContent" --header "x-goog-api-key: $NANO_BANANA_TOKEN" --header "Content-Type: application/json" -d @/tmp/nano_banana_request.json > /tmp/nano_banana_response.json

7. Conversational Editing (Multi-Turn Refinement)

Continue refining by appending the previous model turn and a new user message. Reuse the Base64 image the model returned so you don't re-upload — feed back the final image, not an interim thought frame:

bash
PREV_IMG=$(jq -r '[ .candidates[0].content.parts[]
                    | select((.thought // false) | not)
                    | (.inlineData // .inline_data)
                    | select(. != null) ]
                  | last | .data // empty' /tmp/nano_banana_response.json)

jq -n --arg img "$PREV_IMG" '{
  contents: [
    { role: "user",  parts: [{ text: "A minimalist poster for a jazz festival" }] },
    { role: "model", parts: [{ inline_data: { mime_type: "image/png", data: $img } }] },
    { role: "user",  parts: [{ text: "Make the typography bolder and shift the palette to deep blue and gold." }] }
  ]
}' > /tmp/nano_banana_request.json

curl -s -X POST "https://generativelanguage.googleapis.com/v1beta/models/gemini-3.1-flash-image:generateContent" --header "x-goog-api-key: $NANO_BANANA_TOKEN" --header "Content-Type: application/json" -d @/tmp/nano_banana_request.json > /tmp/nano_banana_response.json

gemini-3.1-flash-lite-image is not optimized for multi-turn sequential editing or multiple reference inputs — use Flash or Pro for sections 5 and 7.

8. Inspect Any Text the Model Returns

The model may include a short text caption/explanation alongside the image. Skip thought parts to get the caption rather than the model's reasoning:

bash
jq -r '.candidates[0].content.parts[] | select((.thought // false) | not) | select(.text != null) | .text' /tmp/nano_banana_response.json

To read the reasoning that led to the image, select the thought parts instead:

bash
jq -r '.candidates[0].content.parts[] | select(.thought == true) | select(.text != null) | .text' /tmp/nano_banana_response.json

Model Reference

ModelNameTierImage sizesOutput price per image
gemini-3.1-flash-imageNano Banana 2Default — versatile workhorse, strong text rendering512 / 1K / 2K / 4K$0.045 / $0.067 / $0.101 / $0.151
gemini-3-pro-imageNano Banana ProHighest quality, best world knowledge and brand consistency1K / 2K / 4K$0.134 / $0.134 / $0.24
gemini-3.1-flash-lite-imageNano Banana 2 LiteCheapest, lowest latency, high volume512 / 1K$0.0336 at 1K

Prices are the standard paid tier at the time of writing; check https://ai.google.dev/gemini-api/docs/pricing before relying on them for budgeting.

Aspect Ratios

gemini-3.1-flash-image and gemini-3.1-flash-lite-image support all 14 ratios:

1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9.

gemini-3-pro-image supports 10 — the four extreme panoramic ratios 1:4, 4:1, 1:8 and 8:1 are not available:

1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9.

If no ratio is specified the model picks one based on any reference images provided, falling back to 1:1.

Image Size

generationConfig.imageConfig.imageSize — "512", "1K" (default), "2K", "4K". Larger sizes cost more and are only relevant to final renders; keep iteration at 1K. gemini-3-pro-image does not offer 512, and gemini-3.1-flash-lite-image stops at 1K.

Response Shape

json
{
  "candidates": [{
    "content": {
      "parts": [
        { "thought": true, "text": "Considering the composition..." },
        { "thought": true, "inline_data": { "mime_type": "image/png", "data": "<interim base64>" } },
        { "text": "Optional caption..." },
        { "inline_data": { "mime_type": "image/png", "data": "<final base64>" } }
      ]
    },
    "finishReason": "STOP"
  }]
}

Guidelines

  1. Endpoint is per-model — the URL ends with <model>:generateContent. Don't try /v1beta/models:generateContent with a model field in the body; the firewall only allows the per-model endpoints.
  2. Use JSON files for request bodies — write to /tmp/nano_banana_*.json to avoid shell quoting issues with long prompts and Base64 payloads.
  3. Always base64 -w0 when preparing Linux image input — base64 without -w0 inserts newlines that break JSON escaping.
  4. Output is Base64, never a URL — decode the image part's data and write bytes directly to disk. The mime_type tells you the extension (png / jpeg / webp).
  5. Take the last non-thought image — Gemini 3 image models always think and return up to two interim images first. Thinking cannot be disabled. Grabbing the first image part gives you a draft; grabbing all of them gives you a corrupt file.
  6. Prefer Flash for iteration, switch to Pro for finals — Flash turns around in a few seconds; Pro is noticeably slower and roughly 2x the cost, but sharper on text, hands, and fine detail.
  7. Keep prompts concrete — describe subject, style, lighting, composition, and mood. For edits, say what to change and what to keep.
  8. Input image size — downscale very large inputs before Base64-encoding; the full round-trip cost scales with payload size.

Heefeg gestallte Froen

Wat mécht de KI-Skill Nano Banana?

Google Gemini image generation (Nano Banana) via the Gemini API. Use when user mentions "Nano Banana", "Gemini image generation", "gemini-3-pro-image", "gemini-3.1-flash-image", or wants to generate/edit images with Google's native image model.

Firwat Nano Banana op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Nano Banana besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Nano Banana an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/okou-ai/okou-skills/tree/main/nano-banana an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Nano Banana benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Nano Banana benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Nano Banana domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Nano Banana gratis?

okou-ai huet de Skill op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇