API Documentation

Credit Balance API

Query the remaining credit balance for the API key owner.

Test API

Endpoint

GET https://api.goanyapi.com/api/v1/credits/balance

This endpoint is free. It does not consume credits or create a credit consumption record.

Authentication

Authorization: Bearer YOUR_API_KEY

Request Parameters

No request parameters are required.

Example

curl "https://your-domain.com/api/v1/credits/balance" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response Example

{
  "code": "ok",
  "message": "ok",
  "data": {
    "remainingCredits": 12500
  }
}

Response Fields

FieldDescription
data.remainingCreditsCurrent available credits

Only active, unexpired credits are included in the balance.

Errors

HTTP StatusCodeDescription
401missing_api_keyAuthorization header missing
401invalid_api_keyAPI key is invalid
401invalid_api_key_ownerAPI key owner does not exist
429rate_limit_exceededToo many requests
500internal_errorInternal server error

Test the Endpoint

You can select Credit Balance API in the Open API Tester. The tester sends a real request but does not deduct credits.