Guide updated
Implemented from official documentation; real-account verification is pending. Please test key creation, permissions, account scope, balance and these instructions with your own account. Automated tests do not establish live reconciliation.
- Required credentials
- CometAPI API key
- Monitoring currency
- USD · US dollars
- What is monitored
- Account balance · USD
- Fixed GET https://query.cometapi.com/user/quota reads total_quota, the current account balance in USD (scope=account). total_quota=25 means $25, not cents or a per-key allowance. The key selects the upstream billing context; there is no project or organization selector.
Check CometAPI balance without sharing a key
- Sign in on the official Credits page and verify the account/organization used by your application.
- Read its USD Credits balance, not the API key's limit or cumulative usage. Workspaces can share Organization Credits.
- Note the amount and time. Manual checking does not require sharing a key or constructing a credential-bearing URL.
Connect CometAPI to Quota Monitor
Confirm the account and Credits page
Open CometAPI Credits below and sign in to the account that pays for your application. If you use teams, check the organization context before noting its USD balance and the time.
Check that you are reading account/Organization Credits, not a key quota or an upstream provider's own wallet. CometAPI and Quota Monitor Workspaces are different groupings.
Review access and create a separate monitoring key
Open API Keys and select Create API Key. Give the new key a recognizable name such as quota-monitor. Keep your existing application keys unchanged.
Check that your organization permits this credential to be stored by Quota Monitor. No balance-only permission is documented. A separate key makes later revocation possible without interrupting your application.
Limit the monitoring key's spending exposure
In the creation dialog, disable Unlimited Quota and set the smallest positive credit limit accepted by the dashboard, then select Create. This follows the balance-query guide rather than the general quickstart's unlimited test setting.
Check the saved key's limit. A small quota does not make a key read-only or guarantee that the query service will accept every restricted configuration. If it fails, stop and check manually; do not remove business safeguards or raise its limit automatically.
Copy only the secret value
Use the copy button in the Key column and save the complete sk- key in a trusted password manager. Do not copy a masked value, key name, Bearer header or browser Cookie.
Check that you have only the API key, not a URL containing it. Although the server must use the provider's key query parameter, you should never open that authenticated URL in a browser or send it in a support ticket.
Connect CometAPI inside your project
In Quota Monitor, open your target project, add a provider connection, choose CometAPI (USD), give it a name and paste the key into the masked credential field. Save the connection.
Check the intended project is selected. Currency is fixed to USD; do not enter a custom host, upstream project or key ID. MCP users should use the secure credential setup link, never pass a provider key to the agent.
Wait for the first balance sync
Wait for initial synchronization or choose Query latest balance. The server calls only the official balance endpoint; no paid model test or top-up is needed.
Check the successful sync timestamp and USD amount. If it fails, use the redacted error and troubleshooting below. An old snapshot with a failed refresh is not a fresh balance.
Reconcile the amount, not key limits
Return to the same account's Credits page at a similar time. For example, total_quota=25 should display $25 even when total_used_quota is 100 or keys[].remain_quota is -1.
Check that cometapiBalance.balance in REST/MCP equals the card and uses scope=account. Never subtract usage again, convert cents, or compare another organization's balance. Record redacted discrepancies and timestamps for your first real-account test.
Handle low funds and rotate safely
Use Open provider to return to Credits. Confirm the billing context before an authorized payer decides whether to top up; team Credit administration requires the Organization Owner. Quota Monitor does not change Auto Top-Up.
For rotation, create a replacement monitoring key, update the connection securely and verify a successful sync before revoking the old monitoring key. Removing a project association or deleting a connection does not revoke the provider key.
What Quota Monitor reads from CometAPI
- Organization Credits are shared by its CometAPI Workspaces. Reusing one account in several Quota Monitor projects does not create separate wallets. Compare the same account/organization and never sum duplicate balances.
- total_used_quota is cumulative spend, already accounted for. keys[].remain_quota is a key limit and -1 means unlimited key quota, not infinite funds. Neither is subtracted from or added to total_quota.
- Only the balance field is retained. Username, key names, key details, request counts and daily usage are discarded. REST/MCP cometapiBalance.balance carries the same exact decimal USD value as the card.
- Only this GET is made, with redirects and caching disabled. No model calls, key management, payment or top-up operations. The key is not sent to the model API host or to a custom URL.
- Zero and negative balances are preserved. Errors or missing/invalid amounts keep the last successful snapshot and time, never fabricate zero. Query time is not a settlement guarantee; positive funds do not guarantee a model request can run.
- The dashboard shows the latest successful snapshot. Manual refresh queries the provider again but cannot eliminate upstream billing delays. An old balance is not a new result after a failed query.
CometAPI FAQ and troubleshooting
- HTTP 401 or invalid key format?
- Copy the full sk- value from API Keys again and confirm it is active. Remove Bearer prefixes, quotes and whitespace. Do not substitute an account access token, key name, masked value or Cookie; report only redacted errors.
- HTTP 403 or a small key quota fails?
- Confirm the selected account and whether its key configuration permits the balance request. This integration cannot assert a read-only permission. Check manually or contact CometAPI support without the secret; do not broaden permissions or raise quotas automatically.
- Why is this not my API key's remaining quota?
- total_quota is the account's USD balance. keys[].remain_quota and used_quota are key-level fields; -1 is their unlimited sentinel. We discard those fields and never interpret that sentinel as account funds.
- Different projects show the same amount?
- Keys may share account or Organization Credits, including across CometAPI Workspaces. Quota Monitor projects only organize your connections. Check billing context and do not total identical wallets or compare a direct provider's funds.
- HTTP 404, 429, redirects or malformed response?
- Keep the redacted error code and time. Wait for scheduled retry or manual-refresh cooldown on 429. A missing endpoint or changed format needs documentation review. Failed reads preserve the previous snapshot; no private endpoint or model-call fallback is used.
- Why is the balance negative, or should I paste a query URL?
- CometAPI documents that a final request can overspend a low balance; negative USD is kept. Enter only the key in the masked form, never an authenticated URL. Server-side HTTPS query authentication is required by the official API, so reject this integration if your policy does not allow that method.
Official CometAPI references
- Official reference · apidoc.cometapi.com/pricing/balance-query(opens in a new tab)
- Official reference · apidoc.cometapi.com/overview/quick-start(opens in a new tab)
- Official reference · apidoc.cometapi.com/workspace/overview(opens in a new tab)
- Official reference · apidoc.cometapi.com/overview/important-guidelines(opens in a new tab)
Prepared by Quota Monitor, not an official provider tutorial. Interfaces and permissions may change; check official pages. Verification is limited to the scope stated here.