Hanzo
OpenapiO11y

Writes the pricing-rule batch — the single write endpoint used by both the user…

Writes the pricing-rule batch — the single write endpoint used by both the user and the Zeus sync job.

PUT /v1/o11y/llm_pricing_rules

Addresshttps://api.hanzo.ai/v1/o11y/llm_pricing_rules
MethodPUT
OperationCreateOrUpdateLLMPricingRules
AuthAuthorization: Bearer $HANZO_API_KEY

Writes the pricing-rule batch — the single write endpoint used by both the user and the Zeus sync job. Per-rule match is by id, then sourceId, then insert; an override row is fully preserved when the request omits isOverride, only its synced_at stamped.

Callers need the admin role; the runtime's own gate enforces it.

Request

16 fields, body application/json (required).

FieldInTypeRequiredDescription
rulesbodyo11y.O11yLLMUpdatablePricingRule[]Rules are the rules to create or update, matched per rule.
rules[].enabledbodybooleanEnabled turns the rule on.
rules[].idbodystringID matches an existing rule by its id.
rules[].isOverridebodybooleanIsOverride pins the rule so the sync job skips it.
rules[].modelNamebodystringModel is the model the rule prices.
rules[].modelPatternbodystring[]ModelPattern are the model-name globs the rule matches.
rules[].pricingbodyo11y.O11yLLMRulePricing
rules[].pricing.cachebodyo11y.O11yLLMPricingCacheCosts
rules[].pricing.cache.modebodystringMode is how cached tokens are counted — subtract (inside input_tokens, OpenAI-style), additive (reported separately, Anthropic-style) or unknown.
rules[].pricing.cache.readbodynumberRead is the cost per unit of cache-read tokens.
rules[].pricing.cache.writebodynumberWrite is the cost per unit of cache-write tokens.
rules[].pricing.inputbodynumberInput is the cost per unit of input tokens.
rules[].pricing.outputbodynumberOutput is the cost per unit of output tokens.
rules[].providerbodystringProvider is the model's provider.
rules[].sourceIdbodystringSourceID matches an existing rule by its upstream source id.
rules[].unitbodystringUnit is the pricing unit, e.g.

Response

StatusBodyMeaning
204no content

Failure carries the platform error shape — see Errors.

Examples

hanzo o11y llm_pricing_rules replace

O11y API · All Hanzo APIs · Interactive reference

How is this guide?

On this page