Replace rate

Sets the model requests one person may make in a minute acting in the organization the caller acts in, on every surface: 1 up to the platform's default, never more, or 0 to hold its people to the default.

PUT /v1/ai/limits/rate

Addresshttps://api.hanzo.ai/v1/ai/limits/rate
MethodPUT
OperationaiSetRateLimit
AuthAuthorization: Bearer $HANZO_API_KEY

Sets the model requests one person may make in a minute acting in the organization the caller acts in, on every surface: 1 up to the platform's default, never more, or 0 to hold its people to the default. An owner or admin of the organization, or a SuperAdmin, may; a member may not, and a shared sign-up org, which has no admin to speak for its people, is refused. A change a page made with the caller's cookie, not the caller (cloud.CSRF), is refused (403). Live at once for every model request. On the audit trail before the write (ai.limits.rate.attempt) and with its outcome (ai.limits.rate), the setting before and after; a trail that does not take the attempt refuses the change (503), and nothing moves.

Request

1 field, body application/json (required).

FieldInTypeRequiredDescription
rpmbodyinteger (int64)—Rpm is the model requests one person may make in a minute acting in the organization: 1 up to the platform's default, or 0 to hold its people to the default.

Response

StatusBodyMeaning
200aiRateok
defaultproblem-detailsrefused

200 body — 4 fields.

FieldInTypeAlwaysDescription
defaultbodyinteger (int64)—Default is the platform's requests a minute, the most the organization may set.
orgbodystring—Org is the organization.
ownbodyinteger (int64)—Own is the organization's own setting, 0 when it holds its people to the default.
rpmbodyinteger (int64)—Rpm is the model requests a minute one person may make acting in it now: its own setting where it set less than the default, else the default.

Failure carries the platform error shape — see Errors.

Examples

hanzo ai limits rate replace
import { Configuration, AiApi } from 'hanzoai';

const api = new AiApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.aiSetRateLimit({ rpm: 0 });
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_set_rate_limit(rpm=0)
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.AiAPI.AiSetRateLimit(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_set_rate_limit(&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).aiSetRateLimit();

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 -X PUT https://api.hanzo.ai/v1/ai/limits/rate \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "rpm": 0
     }'

MCP declares no tool for ai — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.


AI API · All Hanzo APIs · Interactive reference

Was this page useful?
Broken link or missing step? Drop it in #docs on Discord or open a PR.