Skip to main content

Module api

Module api 

Source

Structs§

Meter
One of the account’s three meters: what share of the window’s limit is gone, and when it resets.
Usage
The account’s three meters. Field names are the endpoint’s, so rolling is the 5-hour window.

Constants§

USAGE_URL
The Go usage endpoint — the same source the console reads.

Functions§

fetch
Fetch the account’s meters. One attempt: the caller always has a local fallback, and in watch mode a previous answer, so a retry ladder would only stall the frame it is drawn into.
key
The Go key: OCUSE_API_KEY, else OPENCODE_API_KEY, else the opencode-go entry of opencode’s own auth file — the same credential /connect stores.