Preise+7% Bonus

So erhalten Sie Zugriff auf die Nano Banana Pro API: API-Schlüssel, Python und KI-gestützte Einrichtung

Erhalten Sie einen Nano Banana Pro API-Schlüssel bei GPTProto, führen Sie eine vollständige Python-Anfrage aus, fragen Sie das Ergebnis ab oder lassen Sie einen KI-Coding-Agenten die Integration übernehmen.

So erhalten Sie Zugriff auf die Nano Banana Pro API: API-Schlüssel, Python und KI-gestützte Einrichtung

Der schnellste Weg, die Nano Banana Pro API zu erhalten, besteht darin, die Nano Banana Pro-Modellseite auf GPTProto zu öffnen, auf Dieses Modell ausprobieren zu klicken und einen GPTProto-API-Schlüssel zu erstellen oder auszuwählen. Anschließend können Sie eine cURL- oder Python-Anfrage kopieren. Wenn Sie nicht programmieren, kann dieselbe Seite die Anweisungen als Markdown bereitstellen, damit ein Coding-Agent sie in Ihr Projekt integrieren kann.

Diese Unterscheidung ist wichtig: Nano Banana Pro ist Gemini 3 Pro Image. Es ist nicht Nano Banana 2, das zur Gemini 3.1 Flash Image-Familie gehört. Dieser Leitfaden verwendet die Modell-ID von GPTProto gemini-3-pro-image-preview sowie durchgehend den Text-zu-Bild-Endpunkt.

Schnellstart: Teste zuerst einen Prompt im Playground. Öffne dann Dieses Modell ausprobieren, um deinen Schlüssel zu erstellen und unten entweder den manuellen Python-Weg oder den KI-gestützten Weg auszuwählen.

Inhaltsverzeichnis

What You Need Before Getting the Nano Banana Pro API

You need a GPT Proto account, enough account balance for at least one generation, and a GPT Proto API key. For manual integration, you also need a terminal and Python 3. If you are not comfortable with code, use a coding agent that can inspect and edit your actual project rather than a blank browser chat.

Item Value used in this guide
Product Nano Banana Pro
Official model family Gemini 3 Pro Image
GPT Proto model ID gemini-3-pro-image-preview
Task Text-to-image
Input Text prompt
Output PNG or JPEG image
Available sizes 1K, 2K, and 4K

Google currently lists Nano Banana Pro and Nano Banana 2 as separate models in its Gemini image generation documentation. If the model ID in your code says gemini-3.1-flash-image, you are calling Nano Banana 2—not the Pro model covered here.

Step 1: Open and Test the Nano Banana Pro Model Page

Open the Nano Banana Pro API page and sign in. Before touching any code, use the Playground to run a small test:

  1. Keep the task set to Text To Image.

  2. Enter a short prompt.

  3. Choose 1K, a 1:1 aspect ratio, and PNG output.

  4. Click Generate and confirm that an image is returned.

This separates model problems from integration problems. If the Playground request fails, check the account, balance, and prompt first. If it succeeds but your application fails, the likely issue is the API key, request header, JSON body, or project environment.

Step 2: Create Your Nano Banana Pro API Key

Click Try this model in the upper-right corner of the model page. The Quick Start panel lets you create a new API key or select an existing one.

  1. Click Create API Key.

  2. Copy the new key and store it somewhere private.

  3. Add it to an environment variable named GPTPROTO_API_KEY.

  4. Do not paste it directly into source code.

On macOS or Linux, set the variable for the current terminal session with:

export GPTPROTO_API_KEY="your-api-key"

In Windows PowerShell, use:

$env:GPTPROTO_API_KEY="your-api-key"

This must be a GPT Proto API key. A Google AI Studio key is a different credential and will not authenticate a request sent to the GPT Proto endpoint.

Treat the key like a password. Keep it out of Git, screenshots, browser-side JavaScript, and public AI chats. Google's general API key security guidance also recommends environment variables and warns against exposing keys in client-side applications.

Step 3: Choose Manual or AI-Assisted Integration

After creating the key, choose the route that matches your experience.

Route Best for What happens next
Manual integration You can read Python, JavaScript, or cURL Copy the request, run it, and add the result flow to your application
AI-assisted integration You do not know where the API code belongs Give the model-page Markdown to a coding agent and have it modify the project

If you already know Python, the manual route is faster. If your real question is “Which file should this code go into?”, use the AI-assisted route.

Route A: Call the Nano Banana Pro API with Python

Submit a First Request with cURL

This request starts an asynchronous generation task. It normally returns a task ID rather than the finished image.

curl --request POST "https://gptproto.com/api/v3/google/gemini-3-pro-image-preview/text-to-image" \
  --header "Authorization: Bearer $GPTPROTO_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "prompt": "A tiny origami fox sailing a teacup across a moonlit puddle",
    "size": "1K",
    "aspect_ratio": "1:1",
    "output_format": "png",
    "enable_sync_mode": false,
    "enable_base64_output": false
  }'

A successful submission includes data.id, data.status, and data.urls.get. The output list can still be empty while the status is created or running. That is expected.

Install the Python Dependency

python -m pip install requests

Run a Complete Submit-and-Poll Script

Save the following script as nano_banana_pro.py. It submits the prompt, checks the task every two seconds, stops on failure, and prints the final image URL.

import os
import time

import requests

API_KEY = os.environ.get("GPTPROTO_API_KEY")
SUBMIT_URL = (
    "https://gptproto.com/api/v3/google/"
    "gemini-3-pro-image-preview/text-to-image"
)

if not API_KEY:
    raise RuntimeError("Set GPTPROTO_API_KEY before running this script.")

headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json",
}

payload = {
    "prompt": "A tiny origami fox sailing a teacup across a moonlit puddle",
    "size": "1K",
    "aspect_ratio": "1:1",
    "output_format": "png",
    "enable_sync_mode": False,
    "enable_base64_output": False,
}

def read_data(response):
    response.raise_for_status()
    body = response.json()

    if body.get("code") != 200:
        raise RuntimeError(body.get("message", "GPT Proto returned an error."))

    return body["data"]

submission = requests.post(
    SUBMIT_URL,
    headers=headers,
    json=payload,
    timeout=60,
)
task = read_data(submission)

result_id = task["id"]
poll_url = task.get("urls", {}).get("get")
if not poll_url:
    poll_url = f"https://gptproto.com/api/v3/predictions/{result_id}/result"

print(f"Created task: {result_id}")
deadline = time.monotonic() + 300

while True:
    status = task.get("status")

    if status == "completed":
        outputs = task.get("outputs", [])
        if not outputs:
            raise RuntimeError("The task completed without an output URL.")

        print(f"Image URL: {outputs[0]}")
        break

    if status == "failed":
        raise RuntimeError(task.get("error") or "Image generation failed.")

    if time.monotonic() >= deadline:
        raise TimeoutError("Generation did not finish within five minutes.")

    time.sleep(2)
    result = requests.get(
        poll_url,
        headers={"Authorization": f"Bearer {API_KEY}"},
        timeout=30,
    )
    task = read_data(result)

Run it from the same terminal where you set the environment variable:

python nano_banana_pro.py

Do not treat the first successful POST as a finished generation. The request has only succeeded end to end when the status becomes completed and data.outputs contains a file URL.

Route B: Let a Coding Agent Integrate the API

You do not need to retype the API documentation for an AI assistant. The Nano Banana Pro model page can send it the current endpoint, schema, authentication method, response fields, and code examples.

Open Try this model and choose Copy Markdown for AI. You can also open the LLMs menu and choose one of the following:

  • Copy Markdown content

  • Open Markdown file

  • Copy prompt with URL

  • Open in ChatGPT

  • Open in Claude

  • Open in Gemini

  • Open in Grok

The machine-readable version is also available from the model page's Nano Banana Pro Markdown guide.

Give the Agent Your Project, Not Just a Blank Chat

A browser chatbot can explain code, but it may not know your folders, framework, server entry point, or deployment setup. A coding agent such as Codex, Claude Code, or Cursor can inspect those files and place the integration in the correct part of the project.

The agent still needs:

  • access to the project folder;

  • permission to edit the relevant files;

  • a working Python, Node.js, or other runtime;

  • the Markdown instructions from the model page; and

  • an API key supplied through an environment variable or secret manager.

This is AI-assisted coding, not a no-code API. The agent writes and connects the code, while you approve the changes and provide the runtime and credentials.

Prompt the Coding Agent

Paste the copied Markdown into the agent, then add this instruction:

Integrate the GPT Proto Nano Banana Pro text-to-image API into this project using the attached Markdown documentation. First inspect the existing stack and identify the correct server-side file. Store the API key in an environment variable named GPTPROTO_API_KEY; never hard-code it or expose it in browser-side code. Implement request submission, asynchronous status polling, failed-task handling, and display of the returned image URL. Add only the files required for this integration. Run a minimal test, then report which files you changed, how to start the project, and any step I still need to complete manually.

Do not paste the real key into the instruction. Set it in your terminal, a local .env file excluded from Git, or the secret settings of your deployment platform.

Check the Agent's Work Before Accepting It

You do not need to understand every line to perform a useful review. Check these eight items:

  1. The key is read from GPTPROTO_API_KEY.

  2. The key is not present in browser code or a committed file.

  3. The model ID is gemini-3-pro-image-preview.

  4. The code calls the text-to-image endpoint shown in this guide.

  5. It reads data.id or data.urls.get after submission.

  6. It waits for completed and handles failed.

  7. It reads the final URL from data.outputs.

  8. The agent ran a real minimal test instead of only saying that the code looks correct.

Try it before connecting the full application: Open the Nano Banana Pro Playground, validate the prompt at 1K, and then give the same settings to your coding agent.

Nano Banana Pro API Parameters and Pricing

The basic text-to-image request needs only a prompt. The other fields control the output and response format.

Parameter Required Default Accepted values or purpose
prompt Yes — Description of the image to generate
size No 1K 1K, 2K, or 4K
aspect_ratio No 1:1 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, or 21:9
output_format No png png or jpeg
enable_sync_mode No false Wait for the uploaded result before returning
enable_base64_output No false Return Base64 data instead of a URL

The live GPT Proto model page listed the following rates when this guide was checked in September 2026:

Resolution Price per generation
1K $0.0804
2K $0.0804
4K $0.144

Creating a key does not make the image calls free. Each successful generation consumes account balance. Check the live model page before launching a large batch because availability and rates can change.

For early prompt work, start at 1K. Move to 4K only after the composition, wording, and aspect ratio are correct. The tradeoff is simple: 4K produces a larger asset but costs more per attempt.

Common Nano Banana Pro API Errors

Problem Likely cause What to do
400 Bad Request Invalid JSON, field name, value, or blocked input Compare the request with the current model-page schema
401 Unauthorized Missing or invalid key Confirm GPTPROTO_API_KEY and the Authorization header
403 Forbidden Insufficient balance or missing permission Check the account balance and key status
413 Request Entity Too Large Request body is too large Reduce uploaded or Base64 content
429 Too Many Requests Calls are arriving too quickly Retry with increasing delays and cap the number of attempts
500, 502, or 504 Temporary platform or upstream failure Retry a limited number of times; do not create an infinite loop
The response has no image The task is still created or running Poll data.urls.get until it finishes
Status becomes failed The generation did not complete Read data.error before retrying
The agent says it is done, but nothing runs It wrote code without executing it Ask for the exact test command and the returned status

For transient failures, use exponential backoff rather than sending the same request repeatedly without delay. Also log the result ID: it gives you a specific task to inspect instead of a vague “generation failed” report.

Start with One Verified Generation

If you write code, begin with the cURL request and then use the complete Python script to submit and poll the task. If you do not write code, copy the model-page Markdown into a coding agent and ask it to integrate the same flow inside your project.

In both cases, verify one 1K image before building a larger workflow. Open the Nano Banana Pro API page, test the prompt, and use Try this model to create your key or hand the current integration instructions to your coding agent.

Erwecken Sie Ihre Ideen zum Leben

Verwandeln Sie einen einfachen Prompt oder eine Vorlage in Sekundenschnelle in hochwertige KI-Bilder und -Videos – ganz ohne Einrichtung.

Jetzt kreativ werden
Erwecken Sie Ihre Ideen zum Leben
Verwandte Modelle
Alle Modelle
Google
40% OFF
Google
40% OFF
OpenAI
20% OFF
Claude
10% OFF

Häufig gestellte Fragen

Wie erhalte ich einen Nano Banana Pro API-Schlüssel?

Öffnen Sie die GPTProto-Modellseite von Nano Banana Pro, melden Sie sich an, klicken Sie auf „Dieses Modell ausprobieren“ und wählen Sie „API-Schlüssel erstellen“. Speichern Sie den Schlüssel in einer Umgebungsvariable und verwenden Sie ihn im Authorization-Header Ihrer Anfrage.

Kann ein Anfänger die Nano Banana Pro API verwenden?

Ja. Testen Sie das Modell im Playground, erstellen Sie über Quick Start einen Schlüssel und wählen Sie anschließend entweder das vollständige Python-Beispiel oder den KI-gestützten Integrationsweg. Sie benötigen weiterhin ein Konto, Guthaben, eine Laufzeitumgebung und ein Projekt, in dem die Integration ausgeführt werden kann.

Kann ich die Nano Banana Pro API verwenden, ohne selbst Code zu schreiben?

Ja, wenn Sie einem Coding-Agenten das Markdown der Modellseite und Ihren Projektordner zur Verfügung stellen. Der Agent kann den Integrationscode schreiben und einfügen, aber die fertige Anwendung basiert weiterhin auf Code. Außerdem müssen Sie den API-Schlüssel konfigurieren und die Änderungen genehmigen.

Kann ich die Nano Banana Pro API mit Python verwenden?

Ja. Python kann die Generierung mit requests.post() starten, die zurückgegebene Aufgaben-ID auslesen, die Ergebnis-URL mit requests.get() abfragen und die endgültige Bild-URL aus data.outputs abrufen.

Kann Codex oder ein anderer Agent die API für mich integrieren?

Ja. Verwenden Sie auf der Modellseite „Markdown für KI kopieren“ oder das LLMs-Menü und bitten Sie dann einen Coding-Agenten, Ihr Projekt zu prüfen und den Anfrage- und Abfrageablauf zu implementieren. Speichern Sie den API-Schlüssel in einer Umgebungsvariable und nicht im Prompt.

Ist ein Google-API-Schlüssel dasselbe wie ein GPTProto-API-Schlüssel?

Nein. Der in dieser Anleitung verwendete Endpunkt gehört zu GPTProto und erfordert einen im GPTProto-Dashboard erstellten Schlüssel. Ein für Google AI Studio erstellter Schlüssel wird stattdessen mit den eigenen Endpunkten von Google verwendet.

Ist der Nano Banana Pro API-Schlüssel kostenlos?

Das Erstellen eines Schlüssels und das Bezahlen von Generierungen sind zwei getrennte Vorgänge. Der Schlüssel identifiziert Ihr Konto, während jede API-Generierung Ihrem GPTProto-Guthaben zum aktuellen Preis auf der Modellseite belastet wird.

Wie viel kostet die Nano Banana Pro API?

Bei einer Prüfung im September 2026 listete GPTProto die Generierung in 1K und 2K für 0,0804 $ pro Anfrage und die Generierung in 4K für 0,144 $ pro Anfrage. Prüfen Sie den aktuellen Preis auf der Modellseite, bevor Sie einen großen Auftrag ausführen.

Kann ein einzelner GPTProto-API-Schlüssel auch andere Modelle aufrufen?

Ja. Derselbe GPTProto-Schlüssel kann für verschiedene unterstützte Modelle verwendet werden. Sie benötigen also kein separates Anbieterguthaben und keinen eigenen Schlüssel für jedes Modell. Für jede Anfrage müssen Sie jedoch die richtige Modell-ID, den passenden Endpunkt, die Szene und das Parameterschema verwenden.

Verwandte Artikel

Weitere Blogbeiträge
Kann Nano Banana mehrere Bilder auf einmal generieren?

Kann Nano Banana mehrere Bilder auf einmal generieren?

Kurzfassung Nano Banana 2 unterstützt die Batch-Verarbeitung vollständig. Wenn Sie wissen möchten, ob Nano Banana mehrere Bilder gleichzeitig generieren kann, lautet die Antwort: Ja – bis zu vier pro Standardanfrage oder Tausende über die asynchrone Batch API. Dank dieser Funktion können Kreative über lineare Arbeitsabläufe hinausgehen. Statt auf einzelne Renderings zu warten, können Sie in einem Durchgang Variationen und einheitliche Assets generieren und so Produktionszeit und Iterationszyklen drastisch verkürzen. Durch bestimmte API-Parameter wie den Wert n werden diese parallelen Ausgaben ausgelöst. Das ist eine grundlegende Funktion für alle, die ihre visuellen Inhalte skalieren möchten, ohne an Hardware-Engpässe oder Sitzungs-Timeouts zu stoßen.

Schuyler Stacy | 2026-08-31

20 beste Nano-Banana-Pro-Prompts für 2026: Beispiele zum Kopieren und Einfügen, die wirklich funktionieren

20 beste Nano-Banana-Pro-Prompts für 2026: Beispiele zum Kopieren und Einfügen, die wirklich funktionieren

Die meisten Listen mit Nano-Banana-Pro-Prompts liefern dir einfach mehr Text zum Kopieren. Nur selten erklären sie, welche Details das Ergebnis steuern, welche Teile du ersetzen solltest oder was du schreiben kannst, wenn das erste Bild fast stimmt, aber ein Element abweicht. Die folgenden 20 Prompts sind auf praktisch nutzbare Ergebnisse ausgelegt: Produktanzeigen, Markenboards, Storyboards, konsistente Porträts, Reiseposter, Moodboards und Social-Media-Grafiken. Kopiere einen Prompt, ersetze die Felder in eckigen Klammern und nutze die kurze Korrekturanweisung, wenn das erste Ergebnis eine gezielte Anpassung benötigt. Nano Banana Pro ist Googles Bezeichnung für Gemini 3 Pro Image. Google dokumentiert derzeit Ausgabeoptionen mit 1K, 2K und 4K. Daher wurden Prompts, die beiläufig „8K“ versprechen, auf 4K oder die höchste in deiner Oberfläche verfügbare Auflösung korrigiert. Das Modell kann dennoch bei demselben Prompt unterschiedliche Ergebnisse erzeugen, insbesondere bei exakter Typografie, Geografie oder mehreren Referenzbildern. Weitere Nano-Banana-Pro-Prompts ansehen oder den GPTProto-KI-Bildgenerator öffnen , um mit einem der folgenden Beispiele zu beginnen.

Schuyler Stacy | 2026-08-06

Banana Prompts XYZ Alternative: Kostenlose Nano-Banana-Pro-Prompts zum Remixen

Banana Prompts XYZ Alternative: Kostenlose Nano-Banana-Pro-Prompts zum Remixen

Wenn Sie nach einer Alternative zu Banana Prompts XYZ gesucht haben, brauchen Sie wahrscheinlich keinen weiteren Artikel, der „bessere Prompts“ anpreist. Sie brauchen einen Ort, an dem Sie das Ergebnis ansehen, den vollständigen Prompt öffnen, ihn ändern und ein Bild generieren können, ohne die Idee von Grund auf neu aufzubauen. Die Nano-Banana-Pro-Prompt-Galerie von GPTProto ist dafür eine praktische Lösung. Sie können Prompts ohne Konto durchsuchen und kopieren, Beispiele nach Featured, Newest oder Popular sortieren und eine Idee mit Use Idea in den Generator übernehmen. Zum Generieren müssen Sie sich anmelden; dabei können Credits verbraucht werden. Sie überlegen bereits, ob sich die ursprüngliche Bibliothek lohnt? Lesen Sie die separate Bewertung von Banana Prompts XYZ . Diese Seite konzentriert sich auf den alternativen Workflow.

Schuyler Stacy | 2026-08-05

Banana Prompts XYZ im Test: Was es tut, wo es hilft und wo seine Grenzen liegen

Banana Prompts XYZ im Test: Was es tut, wo es hilft und wo seine Grenzen liegen

TL;DR Banana Prompts XYZ ist eine Bibliothek zum Entdecken von Prompts für KI-Bilder und -Videos. Es ist kein Bildmodell und macht einen inkonsistenten Generator nicht deterministisch. Sein praktischer Wert ist einfacher: Sie können von einem sichtbaren Beispiel ausgehen, anstatt eine Szene von einer leeren Seite aus zu beschreiben. Diese Unterscheidung ist wichtig. Eine Galerie kann Zeit sparen, wenn Sie eine Porträtkomposition, eine Lichtreferenz oder eine Idee für eine Kamerabewegung benötigen. Den Text zu kopieren, ohne das ursprüngliche Modell, die Eingaben und die Einstellungen zu prüfen, kann genauso viel Zeit kosten. Mein Fazit: Nutzen Sie die Seite als visuelles Referenzregal und als Möglichkeit, die Prompt-Struktur zu studieren. Behandeln Sie keinen Prompt als garantiertes Rezept.

Tiffany Layne | 2026-03-14