docs/fireworks.md
Fireworks is API-only for billing: there is no public credit-balance endpoint, so CodexBar shows the last 30 days of rated spend from the account billing summary API instead of a balance gauge.
~/.codexbar/config.json or supplied via FIREWORKS_API_KEY (legacy alias: FIREWORKS_KEY).~/.codexbar/config.json or supplied via FIREWORKS_ACCOUNT_SLUG.CodexBar calls GET https://api.fireworks.ai/v1/accounts to list the accounts visible to the key. A single
account is selected automatically and its slug is saved to the config. When several accounts are visible, the
user must choose one in the app.fireworks.ai home account switcher or obtain it from firectl whoami, then enter
it in Settings. A configured slug remains useful for selecting among multiple accounts.
GET https://api.fireworks.ai/v1/accounts/{account_slug}/billing/summary?startTime=...&endTime=...Authorization: Bearer <api key>, Accept: application/jsonstartTime/endTime as ISO 8601); granularity is not requested.lineItems with rated totalCost entries (currencyCode, units, nanos).units + nanos / 1e9 across line items, using the first rated currency as the display currency
and skipping rows in other currencies.$0.53 under a "Spend" label.The native fetcher remains authoritative. A valid response with no rated line items for a listed account intentionally produces a successful snapshot with no rate window, cost, or detail; the current plugin snapshot contract rejects that shape.
Sources/CodexBarCore/Providers/Fireworks/FireworksProviderDescriptor.swift (descriptor + fetch strategy)Sources/CodexBarCore/Providers/Fireworks/FireworksUsageFetcher.swift (HTTP client + JSON parser)Sources/CodexBarCore/Providers/Fireworks/FireworksSettingsReader.swift (env var resolution)Sources/CodexBar/Providers/Fireworks/FireworksProviderImplementation.swift (settings fields)Sources/CodexBar/Providers/Fireworks/FireworksSettingsStore.swift (SettingsStore extension)