ODOCK.AI
ManagementVirtual API Keys

Key policies

Configure IP, rate, payload, token, and concurrency rules on a virtual API key.

Key policies

Key policies are request controls attached to a virtual API key. They protect a key from being used outside its expected network, traffic pattern, or payload envelope see Guardrails for more details.

They are not content moderation rules. Prompt safety and response safety are covered by Security Engine.

Available Policy Groups

Policy groupFieldsWhat it does
IP rulesAllowlist, blocklistRestricts which client IPs can use the key.
Request rateBurst, requests per minute, requests per secondLimits short-term request frequency.
Token rateTokens per minuteReserves estimated tokens and blocks excessive token volume.
PayloadMax tokens, max request bytesBlocks oversized requests before provider execution.
ConcurrencyMax concurrent requests, lease TTLLimits in-flight requests using the key.

Where Policies Run

Fast checks run early so invalid traffic is rejected before expensive work. Checks that require the decoded request, such as model or token estimates, run later.

Practical Policy Patterns

Use IP allowlists for production services with stable egress IPs.

Use request limits for public-facing apps or scheduled jobs that could accidentally loop.

Use payload limits to prevent very large prompts or file-like payloads from reaching providers.

Use concurrency limits for batch jobs and agent systems that can fan out too aggressively.

On this page