---
title: "Set Frontier Policy"
method: POST
path: "/environments/{env_id}/frontier-policy"
---

# Set Frontier Policy

`POST /environments/{env_id}/frontier-policy`

## Request

- Base URL: `https://api-docs.session-exchange.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.session-exchange.com/environments/{env_id}/frontier-policy`
- Auth: none declared

Opt an environment in/out of frontier-coverage (spec frontier-coverage/v0.1).

Sets `kind` (drives the expected-dimension prior) and/or `frontier_policy`
(`distinctness_theta`, `require_probe_before_complete`,
`external_integration_required`) on the env record — which `GET /model/{env}/
coverage|frontier` and the at_target gate then read. MERGE semantics at both
levels: only fields present in the body are changed, and within
`frontier_policy` only the KEYS SENT are changed (a key set to null is removed,
reverting it to its default) — so tweaking one knob can't silently drop
another (e.g. a theta tweak must not flip the completeness gate on). Send
`frontier_policy: null` to opt back out wholesale to legacy
`complete = all at_target`. Governed/meta: the loop reads this, never writes it.

## Path parameters

- `env_id` string, required

## Request body

- EnvironmentFrontierPolicyRequest: Opt an environment in/out of frontier-coverage (spec frontier-coverage/v0.1). `kind` drives the expected-dimension prior; `frontier_policy` (a loose dict: ``distinctness_theta``, ``require_probe_before_complete``, ``external_integration_required``) turns the gate on. Only fields *present in the request* are changed — omit one to leave it untouched, or send ``frontier_policy: null`` to opt back out to legacy ``complete = all at_target``.
  - `kind` string, nullable
  - `frontier_policy` object, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/session-exchange/apis/a4sx.md) · [All operations](https://skmtc.dev/session-exchange/apis/a4sx/llms.txt) · [OpenAPI document](https://skmtc.dev/session-exchange/apis/a4sx/revisions/abaefc33dfc7?raw)
