Documentation Index
Fetch the complete documentation index at: https://docs.nano-gpt.com/llms.txt
Use this file to discover all available pages before exploring further.
Pay-As-You-Go Billing Override (API)
This override forces a request to be treated as paid (pay-as-you-go), even when the user has an active subscription and the model is subscription-included.What It Does
- Forces a request to be treated as paid (pay-as-you-go).
- Bypasses subscription coverage for that request.
- Allows saved provider preferences to apply to subscription-included traffic.
- Does not change which models support provider selection.
When to Use It
Usebilling_mode: "paygo" when:
- A subscriber wants to force pay-as-you-go billing without selecting a provider in the request.
- A subscriber wants saved provider preferences to apply to subscription-included traffic.
X-Provider for a subscription-included model, the request is charged at the selected provider price and does not need X-Billing-Mode: paygo.
Supported Inputs
HeaderX-Billing-Mode: paygo(header name is case-insensitive)x-billing-modeis also accepted
"billing_mode": "paygo"- Alias:
"billingMode": "paygo"
paygopay-as-you-gopay_as_you_gopaidpayg
API Examples
Example with explicit provider selection:Provider Selection Notes
- Provider selection only works for models that support it.
- If a model does not support provider selection,
X-Provideris ignored. X-Providerexplicitly selects a provider for the request.- Explicit provider selection is always pay-as-you-go and is charged at the selected providerβs price, including provider-selection markup.
- For subscription users, sending
X-Providerbypasses subscription coverage for that request. You do not need to also sendX-Billing-Mode: paygo. - You cannot currently force a provider and have that same request count as subscription-included usage.
Subscription and Limits Behavior
Whenbilling_mode: "paygo" is set:
- The request is not eligible for subscription coverage.
- Subscription quota is not consumed.
- Pay-as-you-go balance checks apply as normal.
subscription.enablePaidModelsApi is false, the request is rejected (same as any other paid API request).
FAQ
Does this affect which models are available? No. It only changes billing eligibility. Model availability is unchanged. Does it force a provider for non-selectable models? No. It only affects billing. UseX-Provider to explicitly select a provider for models that support provider selection.
Can I combine this with BYOK?
Yes. BYOK still works; paygo override only changes subscription eligibility.