Skip to Content

UsageLimitRuleSchema

const UsageLimitRuleSchema: ZodObject<{ api: ZodOptional<ZodObject<{ links: ZodOptional<ZodRecord<ZodString, ZodObject<{ href: ZodString; }, $strip>>>; redactions: ZodOptional<ZodArray<ZodObject<{ path: ZodString; reason: ZodEnum<{ internal: ...; secret: ...; }>; }, $strip>>>; }, $strip>>; createdAt: ZodISODateTime; id: ZodUUID; limit: ZodNullable<ZodInt>; metric: ZodEnum<{ audioBytes: "audioBytes"; audioMilliseconds: "audioMilliseconds"; characters: "characters"; costMicros: "costMicros"; images: "images"; requests: "requests"; tokens: "tokens"; }>; object: ZodLiteral<"usage_limit_rule">; product: ZodUUID; scope: ZodObject<{ kind: ZodEnum<{ model: "model"; modelPattern: "modelPattern"; }>; value: ZodString; }, $strip>; updatedAt: ZodISODateTime; }, $strip>;

Allows the models in its scope on a product, optionally capped per billing period. A product serves a request only when a usage limit rule applies to it.

Last updated on