Skip to main content

Background (Read First)

What it is: This is a beta group whose image responses contain both forms:
  • URL: in the parts[].text field — download it directly or re-host it on your own storage / CDN.
  • Base64: in the parts[].inlineData.data field — the same as what the normal groups return.
Best for scenarios where you use the URL directly. Note that it is not “URL only” — both are returned, and your code can use whichever one it needs. If you don’t need the URL and only use Base64, we still recommend the “Normal Default Group” or the “NanoBanana Enterprise Group”.
Supported models (Nano Banana 2.1 / Pro / 2 / Gen 1):
  • gemini-nano-banana-2.1 (Nano Banana 2.1)
  • gemini-3-pro-image (Nano Banana Pro)
  • gemini-3.1-flash-image (Nano Banana 2)
  • gemini-2.5-flash-image (Nano Banana Gen 1)

Getting Started

1

Ask an admin to enable this visible group

Contact an admin to enable the NB-OSS visible group for your account (add NB-OSS under “Edit User Info → Extra Visible Groups”).
Edit User Info screen, adding the NB-OSS group under Extra Visible Groups

Edit User Info: add NB-OSS under Extra Visible Groups

2

Create a token: select the NB-OSS group

When creating a token, set the billing model to “per-call billing” and select the NB-OSS group (image responses carry both a URL and Base64; the group multiplier is 1x). You only swap the token; the request format stays the same.
Create token screen: billing model set to per-call billing, NB-OSS group selected

Create token: set billing model to per-call billing, select the NB-OSS group (1x)

3

Swap the token and test

Swap in the token and run a test. Responses contain both a URL and Base64 — either one produces the image. Look up parts by field type rather than hard-coding parts indexes.

Example Code

Output Example

The image URL is in the text field; the same response also carries the image’s Base64 in inlineData.data — the OSS group returns both forms, so use whichever you prefer. thoughtSignature is the reasoning signature (base64); ignore it when extracting the image.
parts is a heterogeneous array — the number and order of entries are not guaranteed. Don’t hard-code parts[0] or parts[1] to grab the image. Filter by field type instead (a text part containing the URL, an image part containing inlineData), and when a complex task returns multiple images, take the last one.
Example API response JSON, the text field contains the image URL, the thoughtSignature field is the base64 of the reasoning

Response JSON: candidates → content → parts, the image URL is in the text field; thoughtSignature is the base64 of the reasoning

OSS Storage Region and Download Speed

Where Are the Images Stored?

The output image URLs are hosted on Alibaba Cloud OSS in Los Angeles (US West, us-west-1, North America region). The URLs look like:
The subdomain part of the URL (the <bucket-name>, e.g. mycdn-gg) may change over time — do not hard-code the full domain in your code or firewall rules. If you need to match or allowlist the domain, match the suffix oss-us-west-1.aliyuncs.com (Alibaba Cloud’s official OSS domain), or more loosely allow *.aliyuncs.com.

Downloads Are Slow?

Since the storage node is in North America, direct downloads from some regions (e.g. mainland China) can be slow. Common causes and suggestions:
  • Corporate network throttling / allowlist blocking of overseas traffic: ask your network admin to lift rate limits on and allowlist *.oss-us-west-1.aliyuncs.com (or *.aliyuncs.com).
  • Re-host promptly: download the image as soon as you get the URL and re-upload it to your own storage / CDN before serving end users — don’t expose the OSS URL to end users long-term.
  • Download via a server: if your local network is slow, download through an overseas server (or one with a good network route) first, then relay it.
For more network troubleshooting ideas (DNS, routing, cross-border bandwidth, etc.), see the FAQ: What to Do When CDN Image/Video Downloads Are Slow?

URL Won’t Open?

The key is to restore the escaped sequence \u0026 in the output JSON back to a normal &, while ignoring the base64 content after thoughtSignature.
Diagram: the image link is in the text field, restore the JSON escape backslash u0026 back to the & symbol, and ignore the base64 content after thoughtSignature

The image link is in the text field; restore the JSON-escaped & back to the & in the URL, and ignore the base64 after thoughtSignature