docs/synthetic.md
Synthetic is API-key only. CodexBar reads the quota endpoint and maps the known Synthetic quota lanes into the shared provider card.
Create an API key using Synthetic's API guide, then add it in Settings -> Providers -> Synthetic, or set:
export SYNTHETIC_API_KEY="..."
You can also store the key through the CLI:
printf '%s' "$SYNTHETIC_API_KEY" | codexbar config set-api-key --provider synthetic --stdin
CodexBar sends a read-only request to Synthetic's quota API:
GET https://api.synthetic.new/v2/quotas
Authorization: Bearer <api key>
Accept: application/json
The parser first looks for Synthetic's known quota slots, either at the root
of the response or under data:
rollingFiveHourLimit -> Five-hour quotaweeklyTokenLimit -> Weekly tokenssearch.hourly -> Search hourlyIf those keys are absent, CodexBar falls back to generic quota payloads such as
quotas, quota, limits, usage, entries, or subscription.
codexbar usage --provider synthetic
codexbar usage --provider synthetic.new
Sources/CodexBarCore/Providers/Synthetic/SyntheticProviderDescriptor.swift (descriptor and fetch strategy)Sources/CodexBarCore/Providers/Synthetic/SyntheticUsageStats.swift (HTTP client and parser)Sources/CodexBarCore/Providers/Synthetic/SyntheticSettingsReader.swift (environment variable parsing)Sources/CodexBar/Providers/Synthetic/SyntheticProviderImplementation.swift (settings field and availability)