Cline (app.cline.bot) is API-key based. No browser cookies. Create a key under Settings → API Keys in the Cline web app.
What this provider shows
- Balance in USD (
ProviderBalance.available, currencyUSD). - Spend today / this month, summed from the account’s usage records
(
ProviderBalance.reportedSpend,thisWeeknil). Days and months are the user’s local calendar. - Identity: the account email.
The primary RateWindow is informational (hasKnownLimit: false): Cline has
no quota window, only a prepaid balance.
Data sources
All endpoints live on https://api.cline.bot with Authorization: Bearer <key>.
Every response is wrapped as {success, error, data}; success: false or a
missing data surfaces Cline’s error string.
GET /api/v1/users/me→data {id, email, displayName, organizations[]}. Theidaddresses the next two calls.GET /api/v1/users/{id}/balance→data {balance, userId}.GET /api/v1/users/{id}/usages→data {items: [...]}withaiInferenceProviderName, aiModelName, promptTokens, completionTokens, totalTokens, costUsd, creditsUsed, createdAt, generationId. Decoded leniently: every field optional, numbers accepted as JSON numbers or strings. Best effort: if this call fails, the balance still shows andreportedSpendis nil.
Balance units
balance has no documented unit, and Cline’s own clients disagree: the newer
CLI divides by 1,000,000 (micro-USD), an older webview divided by 10,000.
Runic uses 1,000,000 — it matches the CLI and the usage records, where
creditsUsed / 1e6 == costUsd. The divisor is the single constant
ClineUsageFetcher.balanceUnitsPerUSD.
Credentials
Keychain
- Service:
com.sriinnu.athena.Runic.provider-credentials.v2 - Account:
cline-api-token
Environment variables
CLINE_API_KEY
Fallback order: Keychain first, then CLINE_API_KEY.
Key files
Sources/RunicCore/Providers/Cline/ClineProviderDescriptor.swiftSources/RunicCore/Providers/Cline/ClineUsageFetcher.swiftSources/Runic/Core/Stores/ClineTokenStore.swiftTests/RunicTests/ClineUsageFetcherTests.swift
Read the source ↗ Checked against Runic 2.13.5 · 9730f91