ManagementCreate a preset bundle
Create a preset bundle
1 min readEdit this page
Creates a named bundle of sub-policies. Validation is stricter than the generic create: a rate-limit clause must declare at least one of max_requests / max_tokens, and budget.limit_micro_usd must be strictly positive.
Requires the policy:write scope.
x-api-key<token>
Anthropic-style API key header.
In: header
Path Parameters
nsid*string
Id of the target namespace. Must be owned by the caller (or equal a namespace-baked credential's own namespace), else 404.
Request Body
application/json
Preset request body.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/namespaces/string/presets" \ -H "Content-Type: application/json" \ -d '{ "name": "string" }'{ "budget": { "limit_micro_usd": 0, "window": "day" }, "disabled_at": "2019-08-24T14:15:22Z", "guardrail": { "allow_streaming": true, "byok": "required", "content_patterns": [ { "action": "block", "name": "string", "pattern": "string" } ], "max_request_tokens": 0, "model_allow": [ "string" ], "model_deny": [ "string" ] }, "id": "string", "name": "string", "rate_limit": { "max_requests": 0, "max_tokens": 0, "window_secs": 0 }}{ "error": { "code": "string", "message": "string" }}{ "error": { "code": "string", "message": "string" }}{ "error": { "code": "string", "message": "string" }}How is this guide?