List limits
Reads the caller's plan AI limits: each window's billed cents used and allowed, when it resets, and whether their one free reset for the period is still there.
GET /v1/ai/limits
| Address | https://api.hanzo.ai/v1/ai/limits |
| Method | GET |
| Operation | aiLimits |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Reads the caller's plan AI limits: each window's billed cents used and allowed, when it resets, and whether their one free reset for the period is still there.
Request
GET /v1/ai/limits takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | aiLimits | ok |
default | problem-details | refused |
200 body — 21 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
month | body | aiLimit | — | |
month.limit_cents | body | integer (int64) | — | LimitCents is what the plan covers in this window, in billed cents. |
month.resets_at | body | string | — | ResetsAt is when the window starts again (RFC3339), null for a session that is not running: it starts at the member's next priced call. |
month.used_cents | body | integer (int64) | — | UsedCents is what the plan has covered in this window, in billed cents. |
period_end | body | string | — | |
period_start | body | string | — | PeriodStart and PeriodEnd bound the billing period (RFC3339). |
plan | body | string | — | Plan is the rung that covers AI ("dev", "max-5x", "max-20x", "team", "team-annual"), empty when the caller's plan covers none and they spend bought credit only. |
reset_available | body | boolean | — | ResetAvailable says the member can restart their session and weekly windows now; ResetExpiresAt is when an unused reset lapses (the period end). |
reset_expires_at | body | string | — | |
session | body | aiLimit | — | |
session.limit_cents | body | integer (int64) | — | LimitCents is what the plan covers in this window, in billed cents. |
session.resets_at | body | string | — | ResetsAt is when the window starts again (RFC3339), null for a session that is not running: it starts at the member's next priced call. |
session.used_cents | body | integer (int64) | — | UsedCents is what the plan has covered in this window, in billed cents. |
weekly | body | aiLimit | — | |
weekly.limit_cents | body | integer (int64) | — | LimitCents is what the plan covers in this window, in billed cents. |
weekly.resets_at | body | string | — | ResetsAt is when the window starts again (RFC3339), null for a session that is not running: it starts at the member's next priced call. |
weekly.used_cents | body | integer (int64) | — | UsedCents is what the plan has covered in this window, in billed cents. |
weekly_premium | body | aiLimit | — | |
weekly_premium.limit_cents | body | integer (int64) | — | LimitCents is what the plan covers in this window, in billed cents. |
weekly_premium.resets_at | body | string | — | ResetsAt is when the window starts again (RFC3339), null for a session that is not running: it starts at the member's next priced call. |
weekly_premium.used_cents | body | integer (int64) | — | UsedCents is what the plan has covered in this window, in billed cents. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
import { Configuration, AiApi } from 'hanzoai';
const api = new AiApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.aiLimits();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import AiApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = AiApi(client).ai_limits()cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)
resp, _, err := client.AiAPI.AiLimits(context.Background()).Execute()
if err != nil {
return err
}use hanzo_client::apis::{configuration::Configuration, ai_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = ai_api::ai_limits(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.AiApi;
ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));
var result = new AiApi(client).aiLimits();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
curl https://api.hanzo.ai/v1/ai/limits \
-H "Authorization: Bearer $HANZO_API_KEY"MCP reaches ai through the ai tool, which names its 294 operations with its own verbs — this one among them, under a name only MCP declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_models"
}
}
}'How is this guide?