Google AI Pro and Ultra, as an API
Use your Gemini subscription as an API
Google AI Pro ($19.99 a month) and Ultra ($99.99 or $199.99) stopped working in Gemini CLI on June 18, 2026, and the Gemini API bills every token separately. Plan2API connects your plan through Antigravity with Google sign-in and gives you one OpenAI-compatible key for Gemini 4 Argon and 3.8 Flash, free for 50 requests a day.
- Google AI Pro / Ultra
- $19.99 /
$99.99 or $199.99 - Gemini models
- 5, up to Gemini 4 Argon
- Context window
- 1,048,576 tokens
- Plan2API Free
- 50 requests a day
Updated
Ways to call Gemini from your own code
A Google AI Pro or Ultra plan doesn't give you an API key of its own. The table below compares the four ways to get Gemini into your own code.
On June 18, 2026, Gemini CLI and the Gemini Code Assist IDE extensions stopped serving Google AI Pro and Ultra, and Google moved those plans over to Antigravity CLI and the Antigravity app. If you reach for the Antigravity SDK for Python instead, its quickstart authenticates with a Gemini API key (GEMINI_API_KEY) or Google Cloud credentials for Gemini Enterprise, so it bills per token rather than using your plan.
Plan2API is the option that puts your Google AI plan behind a standard OpenAI-compatible endpoint.
| Option | What it costs | What you get |
|---|---|---|
| Gemini API key | Per token, e.g. Gemini 4 Argon $2 in, $10 out per 1M | Every Gemini API model, pay as you go |
| Developer Program credits | $10 a month with AI Pro, $40 or $100 with Ultra | GenAI and Cloud credits for AI Studio and the Gemini platform |
| Antigravity app and CLI | Your plan's Antigravity quota | Gemini inside Google's own agent tools only |
| Plan2API on your plan | Free for 50 requests a day, Pro $12 a month | OpenAI-compatible key on your Google AI plan |
Connect Google AI Pro or Ultra in 3 steps
- Sign up at plan2api.com/connect with a Google account.
- Connect Gemini by signing in with the Google account that has Google AI Pro or Ultra, on Google's own sign-in page.
- Copy the
p2a_API key you get after connecting (the dashboard Quickstart page has copy-paste setup forcurl, Python and Node).
Here is a streaming curl request to gemini/gemini-4-argon-high at https://api.plan2api.com/v1:
curl https://api.plan2api.com/v1/chat/completions \
-H "Authorization: Bearer $PLAN2API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini/gemini-4-argon-high",
"stream": true,
"messages": [
{"role": "user", "content": "Explain this stack trace in two sentences: ..."}
]
}'Gemini models you can call
Plan2API serves 5 Gemini models through Antigravity, each with a 1,048,576-token context window. The table below lists them next to what the same model costs per million tokens on the pay-per-token Gemini API.
- The
gemini/prefix picks Gemini, andgoogle/andantigravity/work too. - Every model takes text, image, audio and video input.
GET /v1/modelslists every model id Plan2API serves, including providers you haven't connected.
In Antigravity, Google offers Gemini 4 Argon on Ultra and on Google AI Pro (paid, or a trial that came with an eligible premium device), not on Free or Google AI Plus.
| Model id | Context | Gemini API price per 1M (in / out) |
|---|---|---|
gemini/ | 1,048,576 tokens | $2 / |
gemini/ | 1,048,576 tokens | $0.75 / |
gemini/ | 1,048,576 tokens | $0.50 / |
gemini/ | 1,048,576 tokens | $0.30 / |
gemini/ | 1,048,576 tokens | $0.25 / |
What works and what doesn't
- Requests use the OpenAI Chat Completions format on
POST /v1/chat/completions. - Streaming works.
- Tool and function calling work.
- Reasoning effort works via
reasoning_effortor OpenRouter-stylereasoning.effort. - Image input works, and Plan2API fetches image URLs in messages for you (up to 32 per request, up to 20 MB and 15 seconds each).
- JSON mode works with
response_formatset tojson_objectorjson_schema. temperatureandtop_pare passed through to Gemini.- There is no
/v1/responses, no/v1/embeddingsand no native Gemini API format, only Chat Completions. - The API sends
Access-Control-Allow-Origin: *CORS headers, so browser apps can call it directly.
Once streaming has started, any error arrives as a final server-sent event instead of an HTTP status code.
This example runs JSON mode on gemini/gemini-3.8-flash-high with the official OpenAI Python SDK:
from openai import OpenAI
client = OpenAI(
base_url="https://api.plan2api.com/v1",
api_key="p2a_...",
)
reply = client.chat.completions.create(
model="gemini/gemini-3.8-flash-high",
response_format={"type": "json_object"},
messages=[
{"role": "system", "content": "Reply with JSON: {\"sentiment\": ..., \"topics\": [...]}"},
{"role": "user", "content": "The new release fixed sync, but exports are still slow."},
],
)
print(reply.choices[0].message.content)Usage limits on Google AI Pro and Ultra
Plan2API adds no token quota of its own, so your Google AI plan's own limits apply. Plan2API reaches Gemini through Antigravity, where Google sets the limits in the table below.
Google says Antigravity limits track the amount of work the agent does, which means complex tasks use more quota, and that the limits can change to manage capacity. Google AI Plus and Free get a quota that refreshes weekly, while Plan2API connects Google AI Pro and Ultra.
If you have two or more Google AI accounts connected, a request that hits a limit moves to the next account before any output is sent. When every connected account is out of quota, the API returns HTTP 429 subscription_quota_exhausted with a Retry-After header set to the earliest reset, or 429 subscription_throttled when Google is rate limiting.
| Plan | Price | Antigravity quota | Gemini 4 Argon |
|---|---|---|---|
| Free | $0 | Refreshed weekly | No |
| Google AI Plus | $4.99 a month | Refreshed weekly | No |
| Google AI Pro | $19.99 a month | Every 5 hours until a weekly limit | Yes, on paid plans |
| Google AI Ultra | $99.99 or $199.99 a month | Highest, every 5 hours, highest weekly limits | Yes |
Use your Google AI plan in scripts and apps
Plan2API gives your Google AI plan a standard base URL (https://api.plan2api.com/v1) and one p2a_ key that can also route to Claude, ChatGPT (Codex) and Kimi subscriptions by model prefix, so the same OpenAI SDK code works across providers.
Connected logins are encrypted with HPKE (X25519) and AES-256-GCM so only your API key can unlock them, and the key's secret is never stored. Prompts and outputs are never stored, Plan2API's servers and database run on OVHcloud in Germany, and you sign in on Google's own page, so Plan2API never sees your Google password.
- Free is $0 with 1 connected subscription, 2 API keys, 50 chat requests a day and no card.
- Pro is $12 a month or $99 a year with 3 connected subscriptions, 10 API keys and no daily request cap.
- Scale is $29 a month or $249 a year with 25 connected subscriptions, 50 API keys and no daily request cap.
Use the AI subscriptions you already pay for as one OpenAI-compatible API key.
- Free: 1 subscription, 50 requests a day, no card
- Pro: $12 a month
FAQ
Does Google AI Pro include API access?
Not as an API key. The Gemini API bills per token, and Gemini 4 Argon has no free tier there. Google AI Pro does include Google Developer Program Premium, which comes with $10 a month in GenAI and Cloud credits ($40 or $100 a month on Ultra).
Does Gemini CLI still work with Google AI Pro or Ultra?
No. Since June 18, 2026, Gemini CLI and the Gemini Code Assist IDE extensions no longer serve Google AI Pro and Ultra. Google moved those plans to Antigravity CLI and the Antigravity app.
What does Gemini 4 Argon cost on the Gemini API?
It costs $2 per million input tokens and $10 per million output tokens through November 30, 2026, then $4 and $20 from December 1, 2026. Output includes thinking tokens.
Is using my Google AI plan this way allowed?
Google's Antigravity terms say that using third-party software or services to access Antigravity, for example with Antigravity OAuth, breaches the agreement and may be grounds for suspending your Antigravity or Gemini CLI account. Plan2API runs only your own requests on your own account, and any account risk stays with you.
What happens when I hit my Antigravity limit?
With another Google AI account connected, the request moves to it before any output is sent. When every connected account is out, the API returns HTTP 429 subscription_quota_exhausted with a Retry-After header set to the earliest reset.
How much does Plan2API cost?
Free is $0 with no card and includes 1 subscription, 2 keys and 50 chat requests a day. Pro is $12 a month or $99 a year, Scale is $29 a month or $249 a year, and you keep paying Google for your AI plan.
Sources
- Google AI plans (Gemini subscriptions)gemini.google
- Google Developers Blog: Transitioning Gemini CLI to Antigravity CLIdevelopers.googleblog.com
- Google Antigravity: Plans and rate limitsantigravity.google
- Google Antigravity: Choose a modelantigravity.google
- Google Antigravity: Termsantigravity.google
- Google Antigravity SDK overviewantigravity.google
- Gemini Developer API pricingai.google.dev
- Google Developer Program plans and pricingdevelopers.google.com