Skip to main content
GET
Get Account Balance
Use this endpoint for account-level monitoring and before asking a user to recover from 402 insufficient quota. Do not predict whether a particular request will succeed by subtracting hard-coded prices in the client. Task cost depends on current model and parameters; use the task response’s usage metadata and current balance instead.

Authorizations

x-api-key
string
header
required

API key from the Legnext dashboard. Authorization: Bearer <key> is accepted as an alternative.

Response

Balance summary.

code
integer
required

Business status code; mirrors the HTTP status (200 on success).

data
object
required
message
string
required

"success" on success; human-readable error message otherwise.