Checking API usage and balance

Manage your Muzaic API usage and view your current monthly balance via the /accountDetails endpoint.

Using accountDetails endpoint

Get account details

get

Returns detailed information about the API account

Authorizations
MuzaicAPI-Secret-KeystringRequired
Responses
chevron-right
200

Account details retrieved successfully

application/json
accountIdintegerOptionalExample: 123
namestringOptionalExample: My API Account
tokensRemainingintegerOptional

Remaining tokens in account

Example: 1000
tokensUsedintegerOptional

Tokens used this period

Example: 500
planstringOptional

Account plan type

Example: premium
expiresAtstring · date-timeOptional

Account expiration date

Example: 2024-12-31T23:59:59Z
createdAtstring · date-timeOptional

Account creation date

Example: 2024-01-01T00:00:00Z
get
/accountDetails

Response handling

When making a request to an endpoint, you can retrieve several pieces of information:

  • apiVersion: Indicates the current version of the Muzaic API.

  • secretKey: The user's secret key for authentication.

  • freeTokensAvailable: Shows if there are free tokens available (greater than 0) for the account holder.

  • totalUsedTokens: Provides information on the lifetime usage of tokens.

  • currentBalance: Helps estimate the cost for the next billing cycle.

Example response

circle-info

Important: Always include the 'Muzaic API Secret Key' in your request headers.

Last updated