Get billing availability, offered packs, the priced model list, and subscription purchasability.
GET
/api/billing/config
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, 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 — 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 (self-host pickers must never advertise free monthly turns); subscription.purchasable is isProSubscriptionConfigured. When enabled is false the frontend hides the purchase UI (graceful absence).
Responses
Section titled “Responses”{ enabled, packs, models, subscription: { purchasable } }.