apimaxDocs
DocsPricingConsole
API ReferenceIntegration GuideUser GuideChangelog

Music Series

Image Series

Video series

Task Management

Error Code ReferenceQuery Task StatusGET

Account Management

Query Quota UsageGET

Docs / Account Management

Account ManagementGET

Query Quota Usage

Use an API key to query the remaining credits, used credits, and unlimited-quota status of the current key and its owning user.

GEThttps://api.apimax.ai/v1/usage
Try it
Bearer API KeyJSONServer-side call

Purpose#

Query the quota of the current API key and the account quota of the user who owns that key. The endpoint returns remaining credits and cumulative used credits at both the key and user levels, making it suitable for balance displays, pre-call checks, and low-balance alerts.

The legacy /api/usage/token/ endpoint has been removed; use this endpoint instead.

Request example#

cURL
curl --request GET \
  --url https://api.apimax.ai/v1/usage \
  --header 'Authorization: Bearer sk-xxxx'

Authentication and parameters#

This endpoint uses the same API key authentication as model calls and does not require a dashboard login access token.

ParameterLocationTypeRequiredDescription
AuthorizationheaderstringYesBearer <API Key>, i.e. the sk--prefixed string generated when the key was created in the dashboard

The endpoint takes no query or body parameters. The API key must be enabled and not expired, and must satisfy the key's IP and group restrictions.

Success response#

200
{
  "success": true,
  "message": "",
  "data": {
    "token": {
      "remaining_credits": 7.6,
      "used_credits": 2.4,
      "unlimited_credits": false
    },
    "user": {
      "remaining_credits": 12.5,
      "used_credits": 3.5
    }
  }
}

Response fields#

FieldTypeDescription
successboolWhether the request succeeded
messagestringEmpty string on success
data.token.remaining_creditsnumberRemaining credits of the current API key
data.token.used_creditsnumberCumulative used credits of the current API key
data.token.unlimited_creditsboolWhether the current key is an unlimited-quota key
data.user.remaining_creditsnumberRemaining credits in the account of the user who owns the key
data.user.used_creditsnumberCumulative used credits in the account of the user who owns the key

Credit conversion#

Credits in the response are obtained by dividing the internal quota by the system's QuotaPerUnit. With the current default configuration, 500000 quota = 1 credit:

  • 3800000 quota is returned as 7.6 credits
  • Actual billing still settles by model price, input/output tokens, group multiplier, and other billing rules

unlimited_credits=true means the key is not constrained by its remaining key quota; remaining_credits is still provided as a statistical reference. The user's account quota is still managed under the system's billing rules.

Error responses#

HTTPDescription
401API key missing, invalid, disabled, expired, or its quota is exhausted
403The user is disabled, the source IP is not in the key's IP whitelist, or the key's group is unavailable
429Request rate limit exceeded
500Internal query failure on the server
401
{
  "error": {
    "code": "",
    "message": "Invalid token (request id: ...)",
    "type": "new_api_error"
  }
}

Next steps

All docs
Relink Audio URLsSynchronously fetch ready-to-use audio URLs by Suno clip_id.Upsample Style TagsPolish and expand style tags and lyrics into a fuller style description.Get Style Inspiration SuggestionsGet random style or inspiration suggestions from the Suno upstream.Method 1: Create a Voice from an Existing SongCreate a vocal voice directly from a song clip already generated in this pool.Upload AudioImport user audio as a Suno-owned clip; returns an async upload task ID. With copyright=true the request switches to the copyright pipeline.Get MIDIRetrieve a MIDI file for a clip generated by this service.
On this page
OverviewPurposeRequest exampleAuthentication and parametersSuccess responseResponse fieldsCredit conversionError responsesNext steps
API

GET /v1/usage