Get billing availability, offered packs, the priced model list, and subscription purchasability.
const url = 'https://api.tradr.cloud/api/billing/config';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.tradr.cloud/api/billing/configDrives the billing settings tab and the no-BYOK model picker. Authed, unthrottled read (plan-tiers Component 6 — never behind the spend budget). enabled is isStripeConfigured(); packs is CREDIT_PACKS; models is the platform-priced provider/model set restricted to providers with a configured platform key (REQ-7.4) — the authoritative picker source, so the UI never offers an unpriced or unspendable model. Each provider’s allowance model carries allowance: true ONLY when feature gating is enabled (REQ-8.9a/8.8 — self-host pickers must never advertise free monthly turns); subscription.purchasable is isProSubscriptionConfigured() (REQ-2.7). When enabled is false the frontend hides the purchase UI (graceful absence, REQ-10.2).
Responses
Section titled “Responses”{ enabled, packs, models, subscription: { purchasable } }.