| name | description |
|---|---|
antigravity-quota |
Check Antigravity API quota status for all configured Google accounts |
Check your Antigravity API quota status using curl commands.
- Antigravity accounts configured in
~/.config/opencode/antigravity-accounts.json curlandjqinstalled
When user asks to check quota, run the following steps:
cat ~/.config/opencode/antigravity-accounts.jsonExtract the refreshToken and projectId (or managedProjectId) for each account.
For each account, exchange the refresh token for an access token:
curl -s -X POST "https://oauth2.googleapis.com/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "client_id=1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com" \
-d "client_secret=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" \
-d "refresh_token=<REFRESH_TOKEN>" \
-d "grant_type=refresh_token"Use the access token to fetch quota information:
curl -s -X POST "https://cloudcode-pa.googleapis.com/v1internal:fetchAvailableModels" \
-H "Authorization: Bearer <ACCESS_TOKEN>" \
-H "Content-Type: application/json" \
-H "User-Agent: antigravity" \
-d '{"project": "<PROJECT_ID>"}'For convenience, use this combined command (replace placeholders):
ACCESS_TOKEN=$(curl -s -X POST "https://oauth2.googleapis.com/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "client_id=1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com" \
-d "client_secret=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" \
-d "refresh_token=<REFRESH_TOKEN>" \
-d "grant_type=refresh_token" | jq -r '.access_token') && \
curl -s -X POST "https://cloudcode-pa.googleapis.com/v1internal:fetchAvailableModels" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-H "User-Agent: antigravity" \
-d '{"project": "<PROJECT_ID>"}' | jq '.'The API returns a models object with quota info for each model:
{
"models": {
"gemini-3-pro-high": {
"displayName": "Gemini 3 Pro (High)",
"quotaInfo": {
"remainingFraction": 1,
"resetTime": "2026-01-14T09:20:41Z"
}
}
}
}remainingFraction: 1.0 = 100%, 0.5 = 50%, 0 = exhaustedresetTime: ISO 8601 timestamp when quota resets
Present the quota status in a readable table format:
| Model | Remaining | Reset Time |
|---|---|---|
| Gemini 3 Pro (High) | 100% | Jan 14, 09:20 UTC |
| Claude Sonnet 4.5 | 74% | Jan 14, 07:08 UTC |
| Use indicators: |
- 100% = Full quota available
- 50-99% = Partially used (warning)
- <50% = Low quota (alert)
- 0% = Exhausted
| Constant | Value |
|---|---|
| Client ID | 1071006060591-tmhssin2h21lcre235vtolojh4g403ep.apps.googleusercontent.com |
| Client Secret | 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 |
| Token URL | https://oauth2.googleapis.com/token |
| CloudCode Base URL | https://cloudcode-pa.googleapis.com |
| Fetch Models Endpoint | /v1internal:fetchAvailableModels |