Monitor Claude AI Usage Live on PolyCast5 | See Claude Usage Limits
Claude Usage App
PolyCast5 has it's very own built-in Claude usage monitor app! With this, you can monitor your usage limits live while you work without switching tabs/applications. This can also help you prioritize what you need to get done first with your credits.
Though useful, this information unfortunately is not easily exposed. This said, a few extra steps are required to get this working. The main idea behind it is by using a relay architecture to scrape the info from claude.ai using a session cookie.
Setup
First, download the python file below. It will act like a server to send the necessary Claude information from your browser over LAN to your PolyCast5.
If you don't have Python installed, you'll need to install it.
After downloading, run it like below in whatever terminal you use.
python path_to_download/claude_usage_server.py --session-key "<sessionKey>" --org-id "<org-id>"You should see something like this.
Don't worry, it's suppose to fail. The purpose of this is just to get your computer IP address and port. In my case the IP is 192.168.1.188 and the port is 8765.
Now that you have this, open the 'Claude Usage' app on your PolyCast5 (under 'Tools') and connect to the broadcasted network 'PolyCast5-Claude-Portal'. From there, enter the IP and port, then click save.
If the portal menu isn't automatically up, you can go there by clicking the up arrow while on the Claude Usage app.
Great! Now go to your claude.ai usage page in your browser. In my case I'm using Google Chrome.
Now you need to open DevTools. You can do this with the F12 key or by right clicking > Inspect.
From there click the 'Network' tab and then refresh the page and scroll down to the entry that says 'usage'.
From there your organization ID will be visible on the right from 'Request URL'. Copy this!
Next, click the 'Cookies' tab still under 'usage' and scroll down to the sessionKey. Copy this too!
After that, open up your terminal again and re-run the script with your given orginization ID and session key like so.
python path_to_download/claude_usage_server.py --session-key "your_session_key" --org-id "your_organization_id"You should now see something like this:
That's it! It's also important to note that you must be running this script every time you want to use the Claude Usage app. (PC must be awake and running the python file.) Your PolyCast5 and PC must also be connected to the same Wi-Fi network since PolyCast5 fetches this info over LAN.
As a final note, your session key and computer IP address may change over time. When this happens you'll need to swap in the updated information.
Typically your session key will last weeks to a few months, and your computer IP address may change after router reboot or when your DHCP lease expires while the PC is off. Although, you can always reserve an IP address as well to prevent it from changing.
Happy casting!