The
/policy/* surface requires a Policy Gateway plan. The /v1/* compat surface is available to every account.When to use which
- Use
/v1/*for a drop-in experience with the OpenAI or Anthropic SDK — optionally with an inline policy for one-off evaluation. - Use
/policy/*when you want persistent project-level quotas, a console-managed policy, policy events, and streaming policy metadata.
Headers
/policy/* endpoints read three optional headers:
Example:
You can also pick a policy inline with
policy_id (or policyId) at the top level.
Inline policy (no project needed)
Instead of relying on a linked project policy, you can pass apolicy object directly in the request body. Useful for one-off evaluation or testing:
Response metadata
/policy/* responses include extra fields alongside the upstream body:
policy object on every SSE frame — see streaming policy metadata.
Related
- Policy Gateway overview — what policies do
- Onboarding — create a project and link a policy
- Connectors — event shape, decision fields, and SIEM destinations