Billing & Error Codes
This page keeps the current billing and operational error guidance in one place. Use it when you need to explain settlement, investigate a failed request, or align retry behavior.
Billing Flow
LingCoreX uses a two-stage billing flow: estimated pre-authorization first, then final settlement after real usage returns.
Before the request is forwarded upstream, the platform estimates the request cost and performs a pre-authorization check against the billing account.
After the upstream provider returns the actual usage, the platform settles the request against the real usage numbers and adjusts any difference from the estimate.
This is why a request can fail early even before the full upstream call runs.
It is also why final cost can differ from the initial estimate.
Common Error Codes
These are the errors teams most often need to interpret in dashboards, tools, and logs.
| Code | Meaning | What to check next |
|---|---|---|
| 401 | Authentication failed | Check the API key and the expected auth header format. |
| 402 | Insufficient balance for the request | Check account balance, team balance, or the key's daily spend limit. |
| 403 | Authorization or group mismatch | Check whether the key's group can access the requested model or route. |
| 429 | Rate limit hit | Lower concurrency, tune QPM, and add backoff before retrying. |
| 502 | Upstream provider failure | Capture the request ID, then retry according to your incident policy. |