| summary | T3 Chat provider auth, tRPC endpoint, and quota windows. | |||
|---|---|---|---|---|
| read_when |
|
The T3 Chat provider tracks the 4-hour Base and monthly Overage usage buckets from t3.chat.
Unofficial integration: T3 Chat does not publish an API for this data. CodexBar reads a cookie-authenticated endpoint used by the website, so the integration may change or stop working without notice.
- Sign in to T3 Chat in any supported browser.
- Enable T3 Chat in Settings → Providers.
CodexBar imports your browser session cookie automatically. CodexBar sends the cookie only to
https://t3.chat.
Note: Browser cookie import may require Full Disk Access (especially for Safari) or macOS Keychain approval (for Chromium-based browsers).
Set Cookie source to Manual in the T3 Chat provider settings, then paste either:
- A bare
Cookie: ...header value copied from a browser network request tot3.chat, or - A full
curlcommand captured from the T3 Chat settings page (all-Hflags are parsed; only theCookieheader and a fixed set of safe request headers are forwarded).
To capture the cookie manually:
- Open t3.chat/settings/customization in your browser.
- Open Developer Tools → Network tab.
- Reload the page and find a
getCustomerDatatRPC request. - Right-click → Copy → Copy as cURL.
- Paste the full
curlcommand into the T3 Chat cookie field in CodexBar settings.
T3 Chat does not support a standalone environment variable or a --cookie CLI flag. The only manual path is the Settings field above.
CodexBar sends one GET request per refresh:
GET https://t3.chat/api/trpc/getCustomerData?batch=1&input=...
The response is JSONL. CodexBar scans each line for the embedded getCustomerData tRPC result
object in the bundled JavaScript plugin, on both QuickJS and JavaScriptCore. No other T3 Chat endpoints are called.
The request retains the app/CLI web timeout (60 seconds by default), bounded to 1–90 seconds. The plugin fetch budget allows the request to finish without the default 20-second plugin watchdog cutting it short. Captured browser headers retain their existing allowlist; Cookie and Origin remain bound to the T3 Chat request.
| Source field | CodexBar label | Notes |
|---|---|---|
usageFourHourPercentage |
Base (primary) | 4-hour rolling window; 0–100 |
usageFourHourNextResetAt |
Base reset time | JavaScript epoch ms or Unix seconds |
usageWindowNextResetAt |
Base reset time (fallback) | Used when usageFourHourNextResetAt is absent |
usageMonthPercentage |
Overage (secondary) | Monthly overage window |
usagePeriodPercentage |
Overage (fallback) | Used when usageMonthPercentage is absent |
subscription.currentPeriodEnd |
Overage reset time | Billing period end; absent on some plans |
usageBand |
Base label suffix | e.g. "standard" appended as "Base - standard" |
subTier / subscription.productName |
Plan name | Shown as the account identity in the menu |
Timestamps larger than 10 billion are treated as milliseconds; smaller values are treated as Unix seconds.
Base window (primary): 4-hour rolling rate-limit bucket. Tracks the percentage of the hourly model-generation allowance consumed since the window opened. Resets approximately every 4 hours on T3 Chat's server clock.
Overage window (secondary): Monthly overage budget. Tracks spend beyond the included plan allowance. Reset timing comes from the active subscription's current-period end; if no subscription metadata is present, the reset time is shown as unknown.
# Show T3 Chat usage
codexbar usage --provider t3chat
# Or use the alias
codexbar usage --provider t3-chat
codexbar usage --provider t3T3 Chat provides no token-cost data. The usage --format json output contains usage and identity
data, while codexbar cost --provider t3chat is unsupported.
| Error | Cause | Fix |
|---|---|---|
No T3 Chat cookies found |
No browser session for t3.chat |
Sign in to T3 Chat in a supported browser and try automatic mode |
T3 Chat session cookie is invalid or expired |
Stale or revoked session cookie | Sign out of T3 Chat, sign back in, then refresh CodexBar or repaste the cookie |
T3 Chat returned a Vercel security challenge |
Manual Cookie header was used but T3 Chat requires additional Vercel request headers | Paste a full curl capture instead of a bare Cookie header |
Could not parse T3 Chat usage |
T3 Chat changed its tRPC response shape | Open a CodexBar issue with a redacted response sample |
HTTP 401 / HTTP 403 |
Session expired or account not found | Re-authenticate |
HTTP 429 with x-vercel-mitigated: challenge |
Rate-limited by Vercel edge | Wait a few minutes, then retry with a full cURL capture |
Sources/CodexBarCore/Providers/T3Chat/T3ChatProviderDescriptor.swift— provider metadata and fetch pipelineSources/CodexBarCore/Resources/Plugins/t3chat.js— tRPC request, response decoding, and window mappingSources/CodexBar/Providers/Shared/PluginCookieProviderImplementation.swift— settings pickers and bindingsSources/CodexBar/Providers/T3Chat/T3ChatSettingsStore.swift— cookie source and header persistence