Balance

Retrieve API credit balance

Changed on

Returns 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?

OperationsFunding and limits
POST /chat/completions, POST /responsesMetered model usage; API credits or the selected organization PAYG wallet
POST /images/generationsImage-model usage; API credits or the selected organization PAYG wallet
POST /web/searchFixed 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 /capabilitiesDiscovery/metadata; these handlers do not debit generation credits
File upload/list/retrieve/delete, KB list/file-list/insertion/content-search/queryNative 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.

get/balance

Request

  • Base URL
    https://api.textcortex.com/v1
  • Auth
    HTTP bearer

Response

Successful response

api_credit_purchases_allowedboolean

Whether this account may purchase or auto-recharge API credits. False for PAYG accounts when wallet billing is enabled, even while enrolled legacy credits fund requests. Omitted if funding cannot be resolved; false if purchase eligibility cannot be resolved.

currencystring required

API credit currency.

object'balance' required
remaining_creditsnumber required

Remaining TextCortex API credits.

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status