How a policy is set up
Manage policies in the console’s Policies page or with the Policy API and an Admin API key with
policies:write. A policy starts as a draft; publishing it creates an immutable version and puts it to work. You can pause and resume it, and every edit is a new draft until you publish again. An organization can have up to 50 active (monitoring or enforcing) policies.
POST /v1/organization/policies/{policy_id}/publish and {"revision": 1}. Changes take effect within seconds.
Adding policies to one request
Policies withscope: unattached run only when a request names them. Add policy_ids to Chat Completions, Responses, or Messages (up to 20):
400 unknown_policy.
What a blocked request looks like
When an enforcing policy matches, you still get a200 in the endpoint’s normal shape, with this text:
- Request direction:
The "<policy name>" policy doesn't allow this request. - Response direction:
The "<policy name>" policy doesn't allow this response.
The header
x-antara-policy-action: blocked is added when the decision comes before the response headers: every request-direction refusal, and response-direction refusals on non-streaming requests. A streamed response-direction refusal has already sent its headers, so read the in-band marker.
Timing and streaming
Each evaluation has 8 seconds.
Billing
When the judge can’t answer
If an enforcing policy can’t be checked (the judge times out or fails), Antara fails closed and doesn’t bill the request. A request check, or a response check on a non-streaming request, answers503 policy_evaluation_unavailable. A response check on a stream ends the stream with a policy_evaluation_unavailable error event, because the 200 has already been sent. Retrying is safe. Monitoring policies never block; their decision is recorded with check_status failed or timed_out, and result: null.
Decisions
Every evaluation is recorded as a decision: policy and version, direction, mode, result, action (allowed, flagged, or blocked), check status, and latency. Decisions never contain your prompts, outputs, or the judge’s reasoning. See them in the console’s Decisions page, or export them to your own systems. They’re kept for 90 days.
Starter policies
The console offers ready-made policies to start from:A judge is a classifier, not a guarantee. Write rules as specific questions, test them in monitoring mode first, and tune
match_threshold_basis_points before you enforce.