You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Initial models: `grok-4.3`, `grok-build-0.1`, `grok-4.20-0309-reasoning`, `grok-4.20-0309-non-reasoning`, and `grok-4.20-multi-agent-0309`
594
+
- Out of scope for this provider: image, video, TTS, transcription, browser automation, cookies, and Grok web scraping
595
+
596
+
### OAuth Configuration
597
+
598
+
The Grok OAuth flow uses PKCE and does not require committing private secrets. The default client details follow the public xAI OAuth flow used by compatible clients, and every value can be overridden by environment variable:
599
+
600
+
| Variable | Default |
601
+
|----------|---------|
602
+
|`XAI_OAUTH_CLIENT_ID`| Public xAI OAuth client ID |
Administrators can create or reauthorize Grok accounts from the dashboard, or use the admin API:
610
+
611
+
| Endpoint | Purpose |
612
+
|----------|---------|
613
+
|`POST /api/v1/admin/grok/oauth/auth-url`| Generate an xAI OAuth authorization URL |
614
+
|`POST /api/v1/admin/grok/oauth/exchange-code`| Exchange a callback URL, query string, or code for OAuth credentials |
615
+
|`POST /api/v1/admin/grok/oauth/refresh-token`| Validate or refresh a Grok refresh token |
616
+
|`POST /api/v1/admin/grok/accounts/:id/refresh`| Refresh an existing Grok account |
617
+
618
+
Credential storage reuses the existing account JSON fields: `access_token`, `refresh_token`, `token_type`, `expires_at`, optional `email`, optional `subscription_tier`, and `entitlement_status`.
619
+
620
+
### Usage And Quota Display
621
+
622
+
xAI quota is passive. Sub2API does not invent subscription quota values; it records whitelisted xAI rate-limit headers from successful or rate-limited upstream responses when xAI sends them. Before the first usable upstream response, the dashboard shows quota as unknown and still displays local Sub2API usage stats.
623
+
624
+
`401` responses mark the account as needing reauthorization. `403` responses are treated as entitlement or subscription-tier failures instead of token-refresh loops. `429` responses use `Retry-After` or a short cooldown to temporarily remove the account from scheduling.
625
+
626
+
---
627
+
584
628
## Antigravity Support
585
629
586
630
Sub2API supports [Antigravity](https://antigravity.so/) accounts. After authorization, dedicated endpoints are available for Claude and Gemini models.
0 commit comments