<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Jacob GPTProto</title>
    <description>The latest articles on DEV Community by Jacob GPTProto (@official_gptproto_9a4b35a).</description>
    <link>https://dev.to/official_gptproto_9a4b35a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4138516%2F60890b45-e989-43b0-8bbe-27425f980a5e.jpg</url>
      <title>DEV Community: Jacob GPTProto</title>
      <link>https://dev.to/official_gptproto_9a4b35a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/official_gptproto_9a4b35a"/>
    <language>en</language>
    <item>
      <title>5 Best Replicate Alternatives in 2026 for AI APIs</title>
      <dc:creator>Jacob GPTProto</dc:creator>
      <pubDate>Wed, 23 Sep 2026 16:27:19 +0000</pubDate>
      <link>https://dev.to/official_gptproto_9a4b35a/5-best-replicate-alternatives-in-2026-for-ai-apis-29p3</link>
      <guid>https://dev.to/official_gptproto_9a4b35a/5-best-replicate-alternatives-in-2026-for-ai-apis-29p3</guid>
      <description>&lt;p&gt;Replicate combines a model marketplace, media-generation APIs, LLM access, and managed GPU deployments. That makes “Replicate alternative” an unusually broad search: a team may need to replace only one of those functions.&lt;/p&gt;

&lt;p&gt;There is no single platform that replaces all four equally well.&lt;/p&gt;

&lt;p&gt;For ready-made text, image, and video APIs behind one account, &lt;strong&gt;GPTProto is the best overall Replicate alternative&lt;/strong&gt;. Pick fal for media-heavy pipelines, Together AI for open LLMs, Hugging Face Inference Endpoints for Hub or private deployments, and RunPod for direct GPU and container control.&lt;/p&gt;

&lt;p&gt;Before switching, define which part of Replicate you actually need to replace. That one decision matters more than any feature-count comparison.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gptproto.com/model" rel="noopener noreferrer"&gt;One Key for Your Team&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Pricing and product availability in this guide were checked on September 22, 2026. Usage-based prices and model catalogs can change, so confirm the live rate before committing production traffic.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Quick answer: the best Replicate alternatives
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;th&gt;What it replaces well&lt;/th&gt;
&lt;th&gt;Main tradeoff&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GPTProto&lt;/td&gt;
&lt;td&gt;One API key for ready-made text, image, and video models&lt;/td&gt;
&lt;td&gt;Replicate's hosted model API experience&lt;/td&gt;
&lt;td&gt;Not a custom-container or bring-your-own-weights platform&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;fal&lt;/td&gt;
&lt;td&gt;Image, video, and other media inference&lt;/td&gt;
&lt;td&gt;Media model APIs, queues, and webhooks&lt;/td&gt;
&lt;td&gt;Less compelling as an LLM-first provider&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Together AI&lt;/td&gt;
&lt;td&gt;Open LLM inference and fine-tuning&lt;/td&gt;
&lt;td&gt;Language-model serving and dedicated endpoints&lt;/td&gt;
&lt;td&gt;Media is available, but LLM infrastructure is the center of gravity&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hugging Face Inference Endpoints&lt;/td&gt;
&lt;td&gt;Hub, private, and custom model deployment&lt;/td&gt;
&lt;td&gt;Managed endpoints for chosen models and custom handlers&lt;/td&gt;
&lt;td&gt;More setup and infrastructure decisions&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RunPod&lt;/td&gt;
&lt;td&gt;GPU and container control&lt;/td&gt;
&lt;td&gt;Private deployments and custom inference stacks&lt;/td&gt;
&lt;td&gt;Your team owns more of the serving work&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;If your current use case is limited to calling public models, start with API providers rather than GPU infrastructure. If you need custom weights, custom libraries, or a tightly controlled runtime, skip straight to managed endpoints or GPU platforms.&lt;/p&gt;

&lt;p&gt;For a fuller baseline on the product being replaced, see &lt;a href="https://gptproto.com/blog/replicate-ai" rel="noopener noreferrer"&gt;what Replicate AI offers and how its API works&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  First decide what “Replicate alternative” means
&lt;/h2&gt;

&lt;p&gt;Many comparisons place API aggregators, model hosts, and raw GPU clouds in one table, hiding the engineering difference between them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Ready-made model APIs
&lt;/h3&gt;

&lt;p&gt;With a ready-made API, the provider operates the runtime. You send an input, receive a prediction, and pay by image, second, token, or another model-specific unit. Choose this category if you call Replicate's public models and do not maintain weights. GPTProto and fal fit generative media; Together AI specializes in language models.&lt;/p&gt;

&lt;h3&gt;
  
  
  Custom model hosting and GPU infrastructure
&lt;/h3&gt;

&lt;p&gt;Custom hosting gives you hardware, model, container, scaling, and inference-server choices, plus the resulting operational work. Hugging Face Inference Endpoints provides a managed route for Hub models, private repositories, handlers, and containers. RunPod is closer to infrastructure. Do not compare their hourly GPU rates directly with per-image or per-token prices: idle time, storage, throughput, and engineering change the real cost.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. GPTProto — best overall for ready-made text, image, and video APIs
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; GPTProto is the closest choice for teams that use Replicate as a catalog of production-ready generative models rather than as a custom model host.&lt;/p&gt;

&lt;p&gt;GPTProto exposes text, image, and video models through one account and a consistent &lt;code&gt;/api/v3/&lt;/code&gt; API family. Its public catalog listed 233 models when checked: 125 text, 43 image, and 57 video. That breadth suits products that combine several modalities without separate vendor accounts.&lt;/p&gt;

&lt;p&gt;Developers can browse the &lt;a href="https://gptproto.com/model" rel="noopener noreferrer"&gt;GPTProto model catalog&lt;/a&gt; and use the Quick Start on each model page. This reduces account, billing, and integration sprawl.&lt;/p&gt;

&lt;p&gt;Pricing is model-specific. The &lt;a href="https://gptproto.com/model/bytedance/dola-seedream-5-0-pro-260628" rel="noopener noreferrer"&gt;Seedream 5.0 Pro model page&lt;/a&gt; listed 1K generation at $0.0405 and 2K at $0.081. Per-output pricing is easier to budget than GPU time, though retries and failed jobs still count.&lt;/p&gt;

&lt;p&gt;It is not the right replacement if you must upload custom weights, define a container, or reserve a specific GPU. Choose it when the model is already in the catalog; choose Hugging Face or RunPod for runtime control.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where Replicate still wins:&lt;/strong&gt; Replicate has a mature community-model ecosystem and combines public predictions with custom deployments in one product. GPTProto is the cleaner choice for ready-made multimodal access, not a full substitute for that deployment layer.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gptproto.com/model" rel="noopener noreferrer"&gt;One Key for Your Team&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. fal — best for image and video generation pipelines
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; fal is the strongest Replicate alternative for products centered on high-volume image, video, audio, or other media inference.&lt;/p&gt;

&lt;p&gt;fal offers synchronous requests, asynchronous queues, webhooks, and custom Python serverless applications with concurrency and keep-alive controls. Media teams can start with catalog models and later package specialized inference logic.&lt;/p&gt;

&lt;p&gt;Current examples included Seedream V4 at $0.03 per image, Flux Kontext Pro at $0.04, and NanoBanana at $0.0398. Compare the full workflow: resolution, steps, video duration, retries, and output quality change effective cost.&lt;/p&gt;

&lt;p&gt;Its queue model is familiar to Replicate users: submit a job, store an identifier, then process a response or webhook. It is not a drop-in URL change; parameters, statuses, errors, signatures, and retention still need tests.&lt;/p&gt;

&lt;p&gt;The drawback is focus. An application built mainly around open LLM inference will likely prefer Together AI's token pricing and fine-tuning path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where Replicate still wins:&lt;/strong&gt; Replicate's catalog spans many experimental community models, and its Cog-based deployment workflow may already fit teams that publish their own models there.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Together AI — best Replicate alternative for LLM model providers
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; Together AI is the best option on this list when open language-model inference, fine-tuning, and dedicated LLM capacity matter more than image or video variety.&lt;/p&gt;

&lt;p&gt;Together AI covers chat, vision, image, video, and audio, but its LLM stack is the main reason to choose it. Teams can start with token-priced serverless calls, fine-tune supported models, or move predictable traffic to dedicated endpoints and GPU clusters.&lt;/p&gt;

&lt;p&gt;GLM-5.3 Flash was listed at $0.15 per million input tokens and $0.50 per million output tokens; H100 clusters started at $3.99 per GPU hour. Dedicated endpoints bill by the minute while running and can scale to zero.&lt;/p&gt;

&lt;p&gt;Together AI gives LLM teams a focused path from experimentation to fine-tuning and reserved serving. OpenAI-compatible interfaces may reduce changes, but tool calls, structured outputs, context limits, rate limits, and streaming still require model-level tests.&lt;/p&gt;

&lt;p&gt;For a design tool or short-form video generator, fal or GPTProto offers a more natural discovery and integration path.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where Replicate still wins:&lt;/strong&gt; Replicate is easier when the same team wants one long-tail community catalog for miscellaneous ML tasks rather than a provider centered on open-model LLM infrastructure.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gptproto.com/model" rel="noopener noreferrer"&gt;One Key for Your Team&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Hugging Face Inference Endpoints — best for Hub and private models
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; Hugging Face Inference Endpoints is the best Replicate alternative for teams that already manage models on the Hugging Face Hub or need private repositories, custom handlers, and custom containers.&lt;/p&gt;

&lt;p&gt;Inference Endpoints deploys models from libraries such as Transformers, Sentence Transformers, and Diffusers, with custom handlers or containers when standard task interfaces are insufficient. Autoscaling and scale-to-zero reduce operational work.&lt;/p&gt;

&lt;p&gt;Unlike a catalog API, you provision an endpoint around a chosen model and hardware. Nvidia T4 instances were listed at $0.50 per hour, L4 at $0.80, and A10G at $1, billed by the minute. Region, replicas, uptime, scaling, and utilization determine actual cost.&lt;/p&gt;

&lt;p&gt;It fits teams that need governance and model ownership: private models stay in controlled repositories while infrastructure settings remain explicit.&lt;/p&gt;

&lt;p&gt;The tradeoff is setup. Your team chooses hardware, tests memory, sets scaling thresholds, and monitors latency and cost. Scale-to-zero saves idle spend but can introduce cold starts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where Replicate still wins:&lt;/strong&gt; Replicate makes it easier to test many community models immediately and gives custom deployments a workflow designed around its own packaging convention. Hugging Face is stronger when the Hub is already the source of truth.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. RunPod — best for GPU and container control
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Verdict:&lt;/strong&gt; RunPod is the best choice here for engineering teams that want to operate their own inference container without managing physical GPU infrastructure.&lt;/p&gt;

&lt;p&gt;RunPod offers GPU pods, serverless workers, and public endpoints. Flex workers can scale to zero; Active workers remain available for lower startup latency. Serverless usage bills by the second.&lt;/p&gt;

&lt;p&gt;On-demand examples included an A100 80GB at $1.59 per hour, H100 PCIe at $2.89, H100 SXM at $3.49, and L40S at $1.09. Add storage, startup, model downloads, concurrency, observability, failed jobs, and engineering before comparing those rates with managed APIs.&lt;/p&gt;

&lt;p&gt;RunPod fits an optimized inference server, custom model, or compliance need that a shared catalog cannot meet. Teams can tune batching, quantization, caching, and GPU choice.&lt;/p&gt;

&lt;p&gt;That freedom is also the drawback. Migrating from Replicate's public models means recreating validation, queues, file handling, scaling, and result delivery. For a small app, that can cost more than the GPU savings.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Where Replicate still wins:&lt;/strong&gt; Replicate gets a new model behind an API with fewer infrastructure decisions. RunPod wins only when the extra control creates enough technical or economic value to justify ownership.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gptproto.com/model" rel="noopener noreferrer"&gt;One Key for Your Team&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Replicate alternatives compared
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Platform&lt;/th&gt;
&lt;th&gt;Ready-made APIs&lt;/th&gt;
&lt;th&gt;Image and video&lt;/th&gt;
&lt;th&gt;LLMs&lt;/th&gt;
&lt;th&gt;Custom weights&lt;/th&gt;
&lt;th&gt;Custom containers&lt;/th&gt;
&lt;th&gt;Typical billing&lt;/th&gt;
&lt;th&gt;Best fit&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;GPTProto&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;Per output or token&lt;/td&gt;
&lt;td&gt;Multimodal products using catalog models&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;fal&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;Limited relative to specialists&lt;/td&gt;
&lt;td&gt;Yes, through custom apps&lt;/td&gt;
&lt;td&gt;Custom Python apps&lt;/td&gt;
&lt;td&gt;Per output or compute&lt;/td&gt;
&lt;td&gt;Media generation pipelines&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Together AI&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Available&lt;/td&gt;
&lt;td&gt;Strong&lt;/td&gt;
&lt;td&gt;Fine-tuning and dedicated options&lt;/td&gt;
&lt;td&gt;Infrastructure options vary&lt;/td&gt;
&lt;td&gt;Per token, minute, or GPU hour&lt;/td&gt;
&lt;td&gt;Open LLM applications&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hugging Face Inference Endpoints&lt;/td&gt;
&lt;td&gt;Deploy from the Hub&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Instance time&lt;/td&gt;
&lt;td&gt;Private and custom model endpoints&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;RunPod&lt;/td&gt;
&lt;td&gt;Some public endpoints&lt;/td&gt;
&lt;td&gt;Build or deploy your own&lt;/td&gt;
&lt;td&gt;Build or deploy your own&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;Per second or GPU hour&lt;/td&gt;
&lt;td&gt;Custom inference infrastructure&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Which alternative should you choose?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Choose GPTProto&lt;/strong&gt; if you want one key for ready-made text, image, and video models and do not need to upload your own weights.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choose fal&lt;/strong&gt; if media generation is the product and queue, webhook, and custom Python deployment controls are central.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choose Together AI&lt;/strong&gt; if most of your spend and engineering work involves open LLM inference, fine-tuning, or dedicated serving.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choose Hugging Face Inference Endpoints&lt;/strong&gt; if your models already live on the Hub or you need a managed private endpoint with explicit hardware choices.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Choose RunPod&lt;/strong&gt; if you have the engineering capacity to own containers, scaling, monitoring, and performance tuning.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A split architecture can work: GPTProto for media, Together AI for an open LLM, and RunPod for one proprietary model. Consolidation should not force a poor fit.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to migrate a Replicate image workflow to GPTProto
&lt;/h2&gt;

&lt;p&gt;Treat migration as a schema change, not a provider-name change. Prompts may transfer, but model identifiers, request bodies, authentication, response fields, and failure states will differ.&lt;/p&gt;

&lt;p&gt;Start with a synchronous request so the complete response is visible before building a queue or webhook handler. This example calls Seedream 5.0 Pro:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip &lt;span class="nb"&gt;install &lt;/span&gt;requests
&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GPTPROTO_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your_api_key"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;json&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://gptproto.com/api/v3/doubao/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;dola-seedream-5-0-pro-260628/text-to-image&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;response&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Authorization&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GPTPROTO_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Content-Type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;application/json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;prompt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Editorial product photograph of a translucent orange chair &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
            &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;in a pale concrete studio, soft side light, 35mm lens&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
        &lt;span class="p"&gt;),&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;size&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;2048x2048&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;output_format&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;png&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;enable_sync_mode&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;300&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="n"&gt;payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;dumps&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;indent&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;outputs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;outputs&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;outputs&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;outputs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;RuntimeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The request succeeded but returned no output URL.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Generated image:&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;outputs&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Use the selected model's Quick Start because size, duration, aspect ratio, and output parameters vary. For long-running production jobs, adopt the asynchronous flow after confirming its identifier, status, output, and error fields from a live response.&lt;/p&gt;

&lt;p&gt;A practical migration sequence is:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Create a small prompt set representing ordinary, difficult, and invalid inputs.&lt;/li&gt;
&lt;li&gt;Record Replicate outputs, latency, failure rate, and total cost for that set.&lt;/li&gt;
&lt;li&gt;Map each workflow to a specific GPTProto model instead of assuming model names are interchangeable.&lt;/li&gt;
&lt;li&gt;Run the synchronous smoke test and log the full JSON response without exposing credentials.&lt;/li&gt;
&lt;li&gt;Add timeouts, retries with backoff, request IDs, and output validation.&lt;/li&gt;
&lt;li&gt;Move a small traffic percentage, compare results, then increase gradually.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Add a provider adapter after the first model works and its response shape is understood.&lt;/p&gt;

&lt;h2&gt;
  
  
  When you should stay with Replicate
&lt;/h2&gt;

&lt;p&gt;Stay with Replicate if its model meets quality, latency, and budget targets and an alternative offers only a small price difference.&lt;/p&gt;

&lt;p&gt;Keep it when you rely on a niche community model, its private deployment workflow, or tooling built around its predictions and webhooks. Community models can cold-boot—some may take minutes—and synchronous waits may end without output when startup and inference take too long. Asynchronous predictions may solve that without a migration.&lt;/p&gt;

&lt;p&gt;The company joined Cloudflare in November 2025, but the public position was that Replicate would retain its brand, its API would remain unchanged, and existing models would continue. An acquisition alone is not evidence that developers need to leave.&lt;/p&gt;

&lt;p&gt;Compare data handling too. Replicate deletes API-created inputs, outputs, files, and logs after one hour by default; another retention window may help debugging but hurt privacy requirements.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final recommendation
&lt;/h2&gt;

&lt;p&gt;The best Replicate alternative depends on the layer you want to replace. For a managed catalog spanning text, image, and video, start with &lt;a href="https://gptproto.com/model" rel="noopener noreferrer"&gt;GPTProto's available models&lt;/a&gt;. For a media-specific inference platform, test fal. For open LLMs, shortlist Together AI. For private Hub models, use Hugging Face Inference Endpoints. For full container and GPU control, evaluate RunPod.&lt;/p&gt;

&lt;p&gt;Run the same representative workload on two finalists before migrating. Compare accepted output quality, end-to-end latency, failure recovery, data retention, and total cost—not just the price printed next to a model. That test will reveal more than another feature table.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently asked questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is the best alternative to Replicate?
&lt;/h3&gt;

&lt;p&gt;GPTProto is the best overall alternative for developers who want ready-made text, image, and video models under one API account. fal is better for media-first pipelines, Together AI for open LLM workloads, Hugging Face Inference Endpoints for Hub and private models, and RunPod for teams that want GPU and container control.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the best Replicate alternative for image and video generation?
&lt;/h3&gt;

&lt;p&gt;Choose GPTProto when access to a varied image-and-video catalog through one key is the priority. Choose fal when media-specific queues, webhooks, and custom inference applications matter more. Test both with your own prompts because catalog size does not predict output quality for a particular style or task.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is the best Replicate alternative for an LLM model provider?
&lt;/h3&gt;

&lt;p&gt;Together AI is the strongest LLM specialist in this comparison due to its open-model inference, token-based serverless pricing, fine-tuning, and dedicated endpoints. GPTProto is a better fit when the same application also needs a broad selection of image and video APIs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Are Replicate alternatives cheaper?
&lt;/h3&gt;

&lt;p&gt;Sometimes, but advertised units are rarely comparable. A per-image API includes managed infrastructure, while a GPU-hour price excludes idle capacity, storage, scaling, and engineering. Measure the cost of a representative batch, including retries and failed requests, then calculate cost per accepted output or completed user task.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I switch from Replicate without rewriting my application?
&lt;/h3&gt;

&lt;p&gt;Not completely. Even when two services use asynchronous job APIs, their authentication, model identifiers, parameters, status values, webhook formats, and error bodies differ. A small provider adapter can isolate those changes, but each model still needs output-quality and failure-path testing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Will Cloudflare shut down Replicate?
&lt;/h3&gt;

&lt;p&gt;There is no public basis for claiming that. When Replicate announced it was joining Cloudflare, it said the brand would remain distinct, the API would stay the same, and models would continue running. Evaluate the service on current product fit rather than acquisition speculation.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published on GPTProto: &lt;a href="https://gptproto.com/blog/replicate-alternatives" rel="noopener noreferrer"&gt;https://gptproto.com/blog/replicate-alternatives&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>python</category>
      <category>llm</category>
    </item>
    <item>
      <title>How to Get Nano Banana Pro API: Key, Python &amp; AI Setup</title>
      <dc:creator>Jacob GPTProto</dc:creator>
      <pubDate>Wed, 23 Sep 2026 05:39:42 +0000</pubDate>
      <link>https://dev.to/official_gptproto_9a4b35a/how-to-get-nano-banana-pro-api-key-python-ai-setup-fml</link>
      <guid>https://dev.to/official_gptproto_9a4b35a/how-to-get-nano-banana-pro-api-key-python-ai-setup-fml</guid>
      <description>&lt;p&gt;The shortest way to get the Nano Banana Pro API is to open the &lt;a href="https://gptproto.com/model/google/gemini-3-pro-image-preview" rel="noopener noreferrer"&gt;Nano Banana Pro model page on GPTProto&lt;/a&gt;, click &lt;strong&gt;Try this model&lt;/strong&gt;, and create or select a GPTProto API key. From there, you can copy a cURL or Python request. If you do not write code, the same page can package its instructions as Markdown for a coding agent to integrate into your project.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F65x02d7186hkuy3z99ql.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F65x02d7186hkuy3z99ql.png" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This distinction matters: Nano Banana Pro is Gemini 3 Pro Image. It is not Nano Banana 2, which belongs to the Gemini 3.1 Flash Image family. This guide uses GPTProto's &lt;code&gt;gemini-3-pro-image-preview&lt;/code&gt; model ID and its text-to-image endpoint throughout.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Quick start:&lt;/strong&gt; Test one prompt in the Playground first. Then open &lt;strong&gt;Try this model&lt;/strong&gt; to create your key and choose either the manual Python route or the AI-assisted route below.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://gptproto.com/model/google/gemini-3-pro-image-preview" rel="noopener noreferrer"&gt;Start to Get Nano Banana API&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What You Need Before Getting the Nano Banana Pro API
&lt;/h2&gt;

&lt;p&gt;You need a GPTProto account, enough account balance for at least one generation, and a GPTProto 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.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Item&lt;/th&gt;
&lt;th&gt;Value used in this guide&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Product&lt;/td&gt;
&lt;td&gt;Nano Banana Pro&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Official model family&lt;/td&gt;
&lt;td&gt;Gemini 3 Pro Image&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;GPTProto model ID&lt;/td&gt;
&lt;td&gt;gemini-3-pro-image-preview&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task&lt;/td&gt;
&lt;td&gt;Text-to-image&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Input&lt;/td&gt;
&lt;td&gt;Text prompt&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Output&lt;/td&gt;
&lt;td&gt;PNG or JPEG image&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Available sizes&lt;/td&gt;
&lt;td&gt;1K, 2K, and 4K&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Google currently lists Nano Banana Pro and Nano Banana 2 as separate models in its &lt;a href="https://ai.google.dev/gemini-api/docs/image-generation" rel="noopener noreferrer"&gt;Gemini image generation documentation&lt;/a&gt;. If the model ID in your code says &lt;code&gt;gemini-3.1-flash-image&lt;/code&gt;, you are calling Nano Banana 2—not the Pro model covered here.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gptproto.com/model/google/gemini-3-pro-image-preview" rel="noopener noreferrer"&gt;Start to Get Nano Banana API&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Open and Test the Nano Banana Pro Model Page
&lt;/h2&gt;

&lt;p&gt;Open the &lt;a href="https://gptproto.com/model/google/gemini-3-pro-image-preview" rel="noopener noreferrer"&gt;Nano Banana Pro API page&lt;/a&gt; and sign in. Before touching any code, use the Playground to run a small test:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Keep the task set to &lt;strong&gt;Text To Image&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Enter a short prompt.&lt;/li&gt;
&lt;li&gt;Choose &lt;code&gt;1K&lt;/code&gt;, a &lt;code&gt;1:1&lt;/code&gt; aspect ratio, and PNG output.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Generate&lt;/strong&gt; and confirm that an image is returned.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq8xtw3llb6803rfc8qla.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fq8xtw3llb6803rfc8qla.png" width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 2: Create Your Nano Banana Pro API Key
&lt;/h2&gt;

&lt;p&gt;Click &lt;strong&gt;Try this model&lt;/strong&gt; 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.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Click &lt;strong&gt;Create API Key&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Copy the new key and store it somewhere private.&lt;/li&gt;
&lt;li&gt;Add it to an environment variable named &lt;code&gt;GPTPROTO_API_KEY&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Do not paste it directly into source code.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;On macOS or Linux, set the variable for the current terminal session with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;export &lt;/span&gt;&lt;span class="nv"&gt;GPTPROTO_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-api-key"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In Windows PowerShell, use:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight powershell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$&lt;/span&gt;&lt;span class="nn"&gt;env&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="nv"&gt;GPTPROTO_API_KEY&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"your-api-key"&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This must be a &lt;strong&gt;GPTProto API key&lt;/strong&gt;. A Google AI Studio key is a different credential and will not authenticate a request sent to the GPTProto endpoint.&lt;/p&gt;

&lt;p&gt;Treat the key like a password. Keep it out of Git, screenshots, browser-side JavaScript, and public AI chats. Google's general &lt;a href="https://ai.google.dev/gemini-api/docs/api-key" rel="noopener noreferrer"&gt;API key security guidance&lt;/a&gt; also recommends environment variables and warns against exposing keys in client-side applications.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuskfrx92evmqg7s4rxhs.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuskfrx92evmqg7s4rxhs.jpg" width="800" height="421"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 3: Choose Manual or AI-Assisted Integration
&lt;/h2&gt;

&lt;p&gt;After creating the key, choose the route that matches your experience.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Route&lt;/th&gt;
&lt;th&gt;Best for&lt;/th&gt;
&lt;th&gt;What happens next&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Manual integration&lt;/td&gt;
&lt;td&gt;You can read Python, JavaScript, or cURL&lt;/td&gt;
&lt;td&gt;Copy the request, run it, and add the result flow to your application&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;AI-assisted integration&lt;/td&gt;
&lt;td&gt;You do not know where the API code belongs&lt;/td&gt;
&lt;td&gt;Give the model-page Markdown to a coding agent and have it modify the project&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gptproto.com/model/google/gemini-3-pro-image-preview" rel="noopener noreferrer"&gt;Start to Get Nano Banana API&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Route A: Call the Nano Banana Pro API with Python
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Submit a First Request with cURL
&lt;/h3&gt;

&lt;p&gt;This request starts an asynchronous generation task. It normally returns a task ID rather than the finished image.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;--request&lt;/span&gt; POST &lt;span class="s2"&gt;"https://gptproto.com/api/v3/google/gemini-3-pro-image-preview/text-to-image"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--header&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer &lt;/span&gt;&lt;span class="nv"&gt;$GPTPROTO_API_KEY&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--header&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;--data&lt;/span&gt; &lt;span class="s1"&gt;'{
    "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
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A successful submission includes &lt;code&gt;data.id&lt;/code&gt;, &lt;code&gt;data.status&lt;/code&gt;, and &lt;code&gt;data.urls.get&lt;/code&gt;. The output list can still be empty while the status is &lt;code&gt;created&lt;/code&gt; or &lt;code&gt;running&lt;/code&gt;. That is expected.&lt;/p&gt;

&lt;h3&gt;
  
  
  Install the Python Dependency
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python &lt;span class="nt"&gt;-m&lt;/span&gt; pip &lt;span class="nb"&gt;install &lt;/span&gt;requests
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Run a Complete Submit-and-Poll Script
&lt;/h3&gt;

&lt;p&gt;Save the following script as &lt;code&gt;nano_banana_pro.py&lt;/code&gt;. It submits the prompt, checks the task every two seconds, stops on failure, and prints the final image URL.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;
&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;

&lt;span class="n"&gt;API_KEY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;os&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;environ&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GPTPROTO_API_KEY&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;SUBMIT_URL&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://gptproto.com/api/v3/google/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;gemini-3-pro-image-preview/text-to-image&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;API_KEY&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;RuntimeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Set GPTPROTO_API_KEY before running this script.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;headers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Authorization&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Bearer &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;API_KEY&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Content-Type&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;application/json&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;payload&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;prompt&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;A tiny origami fox sailing a teacup across a moonlit puddle&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;size&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;1K&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;aspect_ratio&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;1:1&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;output_format&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;png&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;enable_sync_mode&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;enable_base64_output&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;read_data&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;raise_for_status&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="n"&gt;body&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;json&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;code&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;RuntimeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;message&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;GPTProto returned an error.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="n"&gt;submission&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;post&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;SUBMIT_URL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;json&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;payload&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;read_data&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;submission&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;result_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;id&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;poll_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;urls&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{}).&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;get&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;poll_url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;poll_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;https://gptproto.com/api/v3/predictions/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/result&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Created task: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;result_id&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;deadline&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;monotonic&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;300&lt;/span&gt;

&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;status&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;completed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;outputs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;outputs&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[])&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;outputs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;RuntimeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;The task completed without an output URL.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

        &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Image URL: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;outputs&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;failed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;RuntimeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;task&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;error&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Image generation failed.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;monotonic&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="n"&gt;deadline&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;TimeoutError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Generation did not finish within five minutes.&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;sleep&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;requests&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="n"&gt;poll_url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Authorization&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Bearer &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;API_KEY&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;
        &lt;span class="n"&gt;timeout&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;task&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;read_data&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run it from the same terminal where you set the environment variable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python nano_banana_pro.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;&lt;a href="https://gptproto.com/model/google/gemini-3-pro-image-preview" rel="noopener noreferrer"&gt;Start to Get Nano Banana API&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Route B: Let a Coding Agent Integrate the API
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;Open &lt;strong&gt;Try this model&lt;/strong&gt; and choose &lt;strong&gt;Copy Markdown for AI&lt;/strong&gt;. You can also open the &lt;strong&gt;LLMs&lt;/strong&gt; menu and choose one of the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Copy Markdown content&lt;/li&gt;
&lt;li&gt;Open Markdown file&lt;/li&gt;
&lt;li&gt;Copy prompt with URL&lt;/li&gt;
&lt;li&gt;Open in ChatGPT&lt;/li&gt;
&lt;li&gt;Open in Claude&lt;/li&gt;
&lt;li&gt;Open in Gemini&lt;/li&gt;
&lt;li&gt;Open in Grok&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The machine-readable version is also available from the model page's &lt;a href="https://gptproto.com/model/google/gemini-3-pro-image-preview/llms.txt" rel="noopener noreferrer"&gt;Nano Banana Pro Markdown guide&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Foss-us.gptproto.com%2Fgrowth%2Fimage-wall%2Fcea8ed57-4bb3-4c6f-b109-1916442c2af6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Foss-us.gptproto.com%2Fgrowth%2Fimage-wall%2Fcea8ed57-4bb3-4c6f-b109-1916442c2af6.jpg" width="799" height="359"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Give the Agent Your Project, Not Just a Blank Chat
&lt;/h3&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;The agent still needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;access to the project folder;&lt;/li&gt;
&lt;li&gt;permission to edit the relevant files;&lt;/li&gt;
&lt;li&gt;a working Python, Node.js, or other runtime;&lt;/li&gt;
&lt;li&gt;the Markdown instructions from the model page; and&lt;/li&gt;
&lt;li&gt;an API key supplied through an environment variable or secret manager.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h3&gt;
  
  
  Prompt the Coding Agent
&lt;/h3&gt;

&lt;p&gt;Paste the copied Markdown into the agent, then add this instruction:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Integrate the GPTProto 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 &lt;code&gt;GPTPROTO_API_KEY&lt;/code&gt;; 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.&lt;/p&gt;
&lt;/blockquote&gt;

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

&lt;h3&gt;
  
  
  Check the Agent's Work Before Accepting It
&lt;/h3&gt;

&lt;p&gt;You do not need to understand every line to perform a useful review. Check these eight items:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The key is read from &lt;code&gt;GPTPROTO_API_KEY&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The key is not present in browser code or a committed file.&lt;/li&gt;
&lt;li&gt;The model ID is &lt;code&gt;gemini-3-pro-image-preview&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The code calls the text-to-image endpoint shown in this guide.&lt;/li&gt;
&lt;li&gt;It reads &lt;code&gt;data.id&lt;/code&gt; or &lt;code&gt;data.urls.get&lt;/code&gt; after submission.&lt;/li&gt;
&lt;li&gt;It waits for &lt;code&gt;completed&lt;/code&gt; and handles &lt;code&gt;failed&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;It reads the final URL from &lt;code&gt;data.outputs&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The agent ran a real minimal test instead of only saying that the code looks correct.&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Try it before connecting the full application:&lt;/strong&gt; Open the &lt;a href="https://gptproto.com/model/google/gemini-3-pro-image-preview" rel="noopener noreferrer"&gt;Nano Banana Pro Playground&lt;/a&gt;, validate the prompt at 1K, and then give the same settings to your coding agent.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://gptproto.com/model/google/gemini-3-pro-image-preview" rel="noopener noreferrer"&gt;Start to Get Nano Banana API&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Nano Banana Pro API Parameters and Pricing
&lt;/h2&gt;

&lt;p&gt;The basic text-to-image request needs only a prompt. The other fields control the output and response format.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Parameter&lt;/th&gt;
&lt;th&gt;Required&lt;/th&gt;
&lt;th&gt;Default&lt;/th&gt;
&lt;th&gt;Accepted values or purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;prompt&lt;/td&gt;
&lt;td&gt;Yes&lt;/td&gt;
&lt;td&gt;—&lt;/td&gt;
&lt;td&gt;Description of the image to generate&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;size&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;1K&lt;/td&gt;
&lt;td&gt;1K, 2K, or 4K&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;aspect_ratio&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;1:1&lt;/td&gt;
&lt;td&gt;1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, or 21:9&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;output_format&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;png&lt;/td&gt;
&lt;td&gt;png or jpeg&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;enable_sync_mode&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;Wait for the uploaded result before returning&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;enable_base64_output&lt;/td&gt;
&lt;td&gt;No&lt;/td&gt;
&lt;td&gt;false&lt;/td&gt;
&lt;td&gt;Return Base64 data instead of a URL&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The live GPTProto model page listed the following rates when this guide was checked in September 2026:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Resolution&lt;/th&gt;
&lt;th&gt;Price per generation&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;1K&lt;/td&gt;
&lt;td&gt;$0.0804&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2K&lt;/td&gt;
&lt;td&gt;$0.0804&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4K&lt;/td&gt;
&lt;td&gt;$0.144&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Nano Banana Pro API Errors
&lt;/h2&gt;

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

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://gptproto.com/model/google/gemini-3-pro-image-preview" rel="noopener noreferrer"&gt;Start to Get Nano Banana API&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with One Verified Generation
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;p&gt;In both cases, verify one 1K image before building a larger workflow. Open the &lt;a href="https://gptproto.com/model/google/gemini-3-pro-image-preview" rel="noopener noreferrer"&gt;Nano Banana Pro API page&lt;/a&gt;, test the prompt, and use &lt;strong&gt;Try this model&lt;/strong&gt; to create your key or hand the current integration instructions to your coding agent.&lt;/p&gt;

&lt;h2&gt;
  
  
  Frequently Asked Questions
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How do I get a Nano Banana Pro API key?
&lt;/h3&gt;

&lt;p&gt;Open the GPTProto Nano Banana Pro model page, sign in, click Try this model, and select Create API Key. Store the key in an environment variable and use it in the Authorization header of your request.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can a beginner use the Nano Banana Pro API?
&lt;/h3&gt;

&lt;p&gt;Yes. Test the model in the Playground, create a key through Quick Start, and then choose either the complete Python example or the AI-assisted integration route. You still need an account, balance, runtime, and project in which the integration can run.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I use the Nano Banana Pro API without writing code myself?
&lt;/h3&gt;

&lt;p&gt;Yes, if you give the model-page Markdown and your project folder to a coding agent. The agent can write and place the integration code, but the finished application still uses code underneath. You must also configure the API key and approve the changes.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can I use the Nano Banana Pro API with Python?
&lt;/h3&gt;

&lt;p&gt;Yes. Python can submit the generation with requests.post(), read the returned task ID, poll the result URL with requests.get(), and retrieve the final image URL from data.outputs.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can Codex or another agent integrate the API for me?
&lt;/h3&gt;

&lt;p&gt;Yes. Use Copy Markdown for AI or the LLMs menu on the model page, then ask a coding agent to inspect your project and implement the request and polling flow. Keep the API key in an environment variable rather than the prompt.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is a Google API key the same as a GPTProto API key?
&lt;/h3&gt;

&lt;p&gt;No. The endpoint in this guide belongs to GPTProto and requires a key created in the GPTProto dashboard. A key created for Google AI Studio is used with Google's own endpoints instead.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is the Nano Banana Pro API key free?
&lt;/h3&gt;

&lt;p&gt;Creating a key and paying for generations are separate actions. The key identifies your account, while each API generation is billed against your GPTProto balance at the live model-page rate.&lt;/p&gt;

&lt;h3&gt;
  
  
  How much does the Nano Banana Pro API cost?
&lt;/h3&gt;

&lt;p&gt;When checked in September 2026, GPTProto listed 1K and 2K generation at $0.0804 per request and 4K generation at $0.144. Confirm the current rate on the model page before running a large workload.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can one GPTProto API key call other models?
&lt;/h3&gt;

&lt;p&gt;Yes. The same GPTProto key can be used across supported models, so you do not need a separate provider balance and key for each one. You must still use the correct model ID, endpoint, scene, and parameter schema for every request.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published on GPTProto: &lt;a href="https://gptproto.com/blog/how-to-get-nano-banana-pro-api" rel="noopener noreferrer"&gt;https://gptproto.com/blog/how-to-get-nano-banana-pro-api&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>api</category>
      <category>python</category>
      <category>agents</category>
    </item>
  </channel>
</rss>
