APIMODELSAPIMODELS

Use the Gemini API in China

TL;DR One OpenAI-compatible APIMODELS key — reachable from China, no verification, pay-as-you-go. Base URL: https://api.apimodels.app/v1

Google Gemini is not directly available in mainland China and normally requires a Google Cloud / AI Studio project. APIMODELS proxies Gemini — including the popular image models (gemini-3-pro-image, gemini-2.5-flash-image, "Nano Banana") — through a China-reachable, OpenAI-compatible endpoint.

No Google account, no project setup, no VPN. One key, pay-as-you-go.

Quick start

cURL

curl https://api.apimodels.app/v1/images/generations \
  -H "Authorization: Bearer $APIMODELS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "gemini-3-pro-image", "prompt": "a corgi astronaut, studio light", "size": "1024x1024", "response_format": "url" }'
# → { "created": ..., "data": [ { "url": "https://r2.apimodels.app/images/....jpeg" } ] }

Python

import requests, os
# 传 OpenAI 风格的 size 且不带 callback_url = 一次调用等到出图(实测约 24 秒)。
# 想改成建任务 + 轮询,就去掉 size、改用 aspect_ratio,然后读 data.taskId。
r = requests.post("https://api.apimodels.app/v1/images/generations",
  headers={"Authorization": f"Bearer {os.environ['APIMODELS_API_KEY']}"},
  json={"model": "gemini-3-pro-image", "prompt": "a corgi astronaut",
        "size": "1024x1024", "response_format": "url"},
  timeout=300)
print(r.json()["data"][0]["url"])

FAQ

Do I need a Google Cloud project?

No. You only need an APIMODELS key; we handle the upstream Gemini access.

Is "Nano Banana" available?

Yes — the Gemini image models (gemini-3-pro-image / gemini-2.5-flash-image) are the "Nano Banana" series.

Мы на
APIMODELS on Product HuntAPIMODELS featured on ToolifyAPIMODELS featured on There's An AI For That