Golden Bundles

These are stable starting patterns aligned with current runtime behavior.

API per-key rate limit

{
  "bundle_version": 1,
  "policies": [{
    "id": "api-default",
    "spec": {
      "selector": {"pathPrefix": "/api/"},
      "rules": [{
        "name": "per-key-rps",
        "limit_keys": ["header:x-api-key"],
        "algorithm": "token_bucket",
        "algorithm_config": {"tokens_per_second": 50, "burst": 100}
      }]
    }
  }]
}

LLM TPM/TPD guardrail

{
  "bundle_version": 1,
  "policies": [{
    "id": "llm-default",
    "spec": {
      "selector": {"pathExact": "/v1/chat/completions", "methods": ["POST"]},
      "rules": [{
        "name": "org-llm-budget",
        "limit_keys": ["jwt:org_id"],
        "algorithm": "token_bucket_llm",
        "algorithm_config": {
          "tokens_per_minute": 120000,
          "tokens_per_day": 2000000,
          "burst_tokens": 120000,
          "default_max_completion": 1000
        }
      }]
    }
  }]
}

Abuse kill-switch template

{
  "kill_switches": [{
    "scope_key": "header:x-api-key",
    "scope_value": "abusive-key",
    "reason": "incident_abuse",
    "expires_at": "2026-12-31T23:59:59Z"
  }]
}