List tier

Answers which tier the caller is on, what it allows, and what is left to spend.

GET /v1/billing/tier

Addresshttps://api.hanzo.ai/v1/billing/tier
MethodGET
Operationget_billing_tier
AuthAuthorization: Bearer $HANZO_API_KEY

Answers which tier the caller is on, what it allows, and what is left to spend.

effectiveAvailable is the ONLY figure to compare against zero. The others are its parts — prepaid money, granted credits and the daily term are three sources of one spend, not three balances to add up a second time.

A tier that cannot be READ is an error, never Free. The router in front of the models maps any non-2xx to Free, so answering Free from a question nobody could answer would pin every paying customer to the most restrictive row with nothing anywhere to find.

A named handler, not a closure, so zipdoc can lift this prose into the registry.

Request

GET /v1/billing/tier takes no parameters and no body — the credential is the whole request.

Response

StatusBodyMeaning
200billing.Tierok
defaultproblem-detailsrefused

200 body — 16 fields.

FieldInTypeAlwaysDescription
balancebodybilling.TierBalance—
balance.creditsRemainingbodyinteger (int64)—
balance.currencybodystring—
balance.dailyRemainingbodyinteger (int64)—
balance.effectiveAvailablebodyinteger (int64)—
balance.prepaidAvailablebodyinteger (int64)—
planbodystring—Plan is the catalog rung the subject is served as ("" with no plan).
subscriptionbodystring—Subscription is the id of the subscription row whose plan is the served rung, "" when the tier is not a subscription's.
tierbodybilling.TierLimits—
tier.allowedModelsbodystring[]—
tier.dailyCreditsCentsbodyinteger (int64)—
tier.displayNamebodystring—
tier.maxAgentsbodyinteger (int64)—
tier.namebodystring—
tier.unlimitedAgentsbodyboolean—UnlimitedAgents reports that MaxAgents 0 means "no ceiling" rather than "no agents" — the reading a bare zero cannot carry.
userbodystring—

Failure carries the platform error shape — see Errors.

Examples

hanzo billing tier
import { Configuration, BillingApi } from 'hanzoai';

const api = new BillingApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getBillingTier();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import BillingApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = BillingApi(client).get_billing_tier()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.BillingAPI.GetBillingTier(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, billing_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = billing_api::get_billing_tier(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.BillingApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new BillingApi(client).getBillingTier();
curl https://api.hanzo.ai/v1/billing/tier \
  -H "Authorization: Bearer $HANZO_API_KEY"

Tool billing, op get_billing_tier — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "billing",
         "arguments": {
           "op": "get_billing_tier",
           "input": {}
         }
       }
     }'

Billing API · All Hanzo APIs · Interactive reference

Was this page useful?