| summary | DeepInfra provider setup, API-key billing queries, and balance/spend display. | |||
|---|---|---|---|---|
| read_when |
|
DeepInfra is API-only. CodexBar uses DeepInfra's documented billing endpoints and does not send model prompts or account data to any other service.
- Create an API key in the DeepInfra dashboard.
- In CodexBar, open Settings > Providers > DeepInfra > API tokens and add the key.
You can instead set DEEPINFRA_API_KEY or DEEPINFRA_TOKEN in CodexBar's environment. DEEPINFRA_API_KEY takes precedence when both are present.
CodexBar sends the key as a bearer token to:
GET https://api.deepinfra.com/payment/checklist?compute_owed=truefor prepaid balance, recent spend, spending limit, and suspension state.GET https://api.deepinfra.com/payment/usage?from=currentfor current-month spend.
DeepInfra represents prepaid funds as a negative stripe_balance; CodexBar converts that to a positive “available” amount. A positive value is shown as money owed.
- The automatic menu-bar metric shows available prepaid balance.
- The provider card shows available balance and current-month spend without inventing a percentage quota.
- If the account has a positive spending limit, CodexBar shows billing-cycle spend against that limit.
- A suspended account is shown as exhausted with DeepInfra's suspension reason when one is provided.
401: DeepInfra rejected the API key. Remove the saved token, create a new API key, and enter it without aBearerprefix.403: The key is valid but cannot access DeepInfra billing data.- Missing provider: enable DeepInfra under Settings > Providers and add a token account or environment key.
CodexBar never logs the API key or raw billing response.