Get ChatGPT Codex usage limits
Automatically get ChatGPT Codex usage limits on chatgpt.com. Read the Codex usage limits of the ChatGPT account open in this browser, as ChatGPT loads them for its Codex usage panel: the plan, whether Codex use is allowed right now and whether a limit is reached, and each usage window (on paid plans usually the 5-hour and the weekly window; on Free a single 30-day window) with its percent used, its length in seconds and its reset time (ISO), plus the code-review limit, any extra per-feature limits, and the credits state. ChatGPT chats have no usage meter of their own; these are the Codex limits that come with the ChatGPT plan. Read-only. A signed-out browser fails with an error that says to sign in; a refused or rate-limited usage request fails within seconds with the HTTP status.
Input
None
Output
plan requiredemail requiredreadAt requiredallowed requiredcredits requiredwindows requiredaccountId requiredlimitReached requiredadditionalLimits requiredlimitReachedType requiredcodeReviewWindows requiredFAQ
Ask ChatGPT
Open a new ChatGPT chat, send one question, wait for the answer to finish (up to 3 minutes), and return the answer, the sources it cited, and the web searches it ran. `answers` is a list: ChatGPT sometimes answers twice and asks which reply you prefer, so check its length before reading answers[0]. `references` are the pages the answer cited, each with the id of the search result it came from when ChatGPT gives one (the search call and the result's rank in it); `sources` is the wider set of pages its searches found. An empty `references` means that reply cited nothing: the same question may search on one run and not the next, so repeat it before drawing conclusions. `webSearchQueries` lists what ChatGPT searched for, `searches` groups those queries by round with their results, and `calls` lists each search call with every result's type, position, snippet and date. `activity` gives the progress lines the page showed while it worked ("Searching the web", "Searched 8 websites"). `model`, `stopReason` and `searchContext` say which model answered and how; signed in, `searchContext` also gives the model and thinking effort the account asked for, and its plan. Signed in, it answers in Chat mode only: when the browser is in Work mode it fails with an error that says so; switch back with set_mode (a Chat choice lasts about four hours). Works signed in or signed out, on a Reduck cloud browser or your own paired browser, in any display language. Signed in, every field is filled, and the account's saved memory can influence the answer. Signed out, ChatGPT shows the answer and its citations but not its searches: `answers`, `references` (with each citation's search result id) and `activity` are filled, and `webSearchQueries`, `searches`, `sources`, `calls`, `model` and `stopReason` are null (unknown, not none).
ChatGPT billing: list your ChatGPT subscription invoices
ChatGPT subscription invoices, not the OpenAI API platform. Lists the billing history of the ChatGPT account currently open in this browser, as its Billing page shows it: only that account's invoices, never those of the user's other accounts. To get another account's invoices, switch ChatGPT to that account, then run this again. A Business, Team or Enterprise workspace open in the browser has no personal Billing page, and the run fails saying so. Each invoice comes with its date, amount, currency, payment status, plan and a link to the invoice; the result also names the active account and lists every account the user belongs to. Amounts are in the currency's smallest unit, so 1917 means 19.17 EUR. The Billing page shows the most recent invoices first and this script cannot page further: when ChatGPT says older invoices exist, complete is false and next_cursor holds the cursor ChatGPT gave, but those older invoices are not returned. When the browser is not signed in to ChatGPT, the run fails with a not-signed-in error. Pass hosted_invoice_url to the Stripe invoice PDF download script to get the PDF.
ChatGPT whoami (signed-in account)
Report which ChatGPT account this browser is signed in as: the user id, email and name. When the browser is signed out of ChatGPT, the run fails with a message asking you to sign in to chatgpt.com, so it can be used to check a session before running other ChatGPT scripts.
