Usage & billing

Inspect available credit, understand reservations, and read the pricing policy for each model.

API guide · Reviewed 11 October 2026

Check credit and usage

Authenticated read-only endpoints
curl --fail-with-body https://formalengines.com/inference/v1/billing/balance \
  -H "Authorization: Bearer $FE_API_KEY"

curl --fail-with-body 'https://formalengines.com/inference/v1/billing/usage?limit=20' \
  -H "Authorization: Bearer $FE_API_KEY"

You can also view usage and add credit in the dashboard. Monetary fields ending in _micros use millionths of a US dollar: 1,000,000 means $1.00.

Reservations and final charges

Before generation, the gateway reserves credit based on the estimated input and output budget. It then settles the request using reported usage when available and releases the hold. Available credit can therefore be lower than your balance while requests are running.

When provider usage is unavailable, a request can be metered using an estimate. Check the settled usage record rather than inferring a final charge from a streaming response’s initial headers. A large output reservation can be refused with HTTP 402 even if the eventual answer would have been short.

Published rates and your account

The public model endpoint shows base pricing per million tokens. On standard rate-card models, the better of your account discount and volume-tier discount applies once to the configured list rates. Discounts are not stacked. Cached input has its own rate.

Fixed-price models do not receive additional account or volume discounts. Models marked actual_cost_plus_20_percent, and requests using that fallback billing policy, are billed at actual cost plus 20%; ordinary discounts do not apply. Inspect the model’s billing_basis and fallback_billing_basis before relying on a published rate.

Operator price changes apply to new requests. Your account’s historical charges are not repriced. Use the dashboard for your account terms and the catalog for published model rates.

Response headers

HeaderPurpose
x-request-idSupport and request correlation, when assigned
x-fe-modelPublic model identifier
x-fe-tierPricing tier used by the request
x-fe-cost-microsSettled charge when available on a non-streaming response
x-fe-billing-statusMay indicate pending settlement
x-fe-pricingIdentifies cost-plus pricing where applicable

Not every header is present on every endpoint or error. For final streaming charges, consult the billing usage record.

Need a hand? Contact support with your request ID. Keep your API key private.