Retrieve API credit balance
Changed onReturns the remaining API credit balance for the authenticated TextCortex API key. API-credit fields are preserved even when model requests use wallet funding. Inspect billing_source and optional wallet for that funding source. Unavailable projections are not zero balances.
GET /balance retains remaining_credits and currency for API credits. Inspect billing_source for the funding source selected for priced model requests. When wallet funding applies, wallet.remaining_amount is the available wallet amount after pending usage, in wallet.currency. An available: false projection means the source or capacity could not be resolved; it must not be interpreted as a zero balance. Wallet availability and selection depend on the deployment and account policy. api_credit_purchases_allowed is independent of the funding source. When PAYG wallet billing is enabled, PAYG accounts cannot buy or auto-recharge API credits, including accounts explicitly allowed to spend their existing credits first. Those accounts switch to their PAYG wallet once the legacy balance is exhausted. Web search uses the PAYG wallet if the legacy remainder cannot cover its fixed EUR 0.01 fee; the remainder stays available for model requests. /capabilities reports the funding source selected for web search. The purchase field can be absent when funding cannot be resolved; do not treat an absent field as purchase authorization.
Which funding source applies?
| Operations | Funding and limits |
|---|---|
| POST /chat/completions, POST /responses | Metered model usage; API credits or the selected organization PAYG wallet |
| POST /images/generations | Image-model usage; API credits or the selected organization PAYG wallet |
| POST /web/search | Fixed charge using API credits or the selected organization PAYG wallet. Read textcortex.api_platform.web_search in GET /capabilities: billing identifies the funding source and price gives the published price; response usage reports the charge |
| GET /models, GET /models/{model_id}, GET /balance, GET /capabilities | Discovery/metadata; these handlers do not debit generation credits |
| File upload/list/retrieve/delete, KB list/file-list/insertion/content-search/query | Native document workflows; these handlers do not reserve the web-search charge or run a priced chat completion. Storage, indexing, retrieval access and account limits still apply; this is not a promise of unlimited free processing |
Funding selection depends on account and deployment policy. A selected wallet that cannot fund a model request does not silently fall back to API credits. remaining_credits is the API-credit balance; it is not the wallet balance. Use wallet.remaining_amount and wallet.currency when wallet funding applies. An unavailable projection is not proof of zero funds. Balance is a snapshot, not a reservation or guarantee that the next request will succeed.
A successful web search can charge even if its results are empty. API-credit requests reserve credits before search and refund on failure; wallet requests check funds before search and settle the charge afterward. A client disconnect is not proof that the server failed or that no charge was applied.
Request
- Base URLhttps://api.textcortex.com/v1
- AuthHTTP bearer
Response
Successful response
Changes
- info
added the optional property
to the response with the status
- info
- info
added the optional property
to the response with the status - info
added the optional property
to the response with the status
- info