---
title: "Set Eval Oracle"
method: POST
path: "/environments/{env_id}/eval-oracle"
---

# Set Eval Oracle

`POST /environments/{env_id}/eval-oracle`

## 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}/eval-oracle`
- Auth: none declared

Register the environment's evaluation oracle for SCORE VERIFICATION
(collector/receipts.py): the shared HMAC key (stored server-side only — every
read path scrubs it) plus `require_receipt`. Once set, request_authorization
verifies that a reported `score` IS the oracle's signed, measured fitness;
with `require_receipt` it rejects anything else. Governed/meta: the loop can
never see or set the key — admin only.

## Path parameters

- `env_id` string, required

## Request body

- EnvironmentEvalOracleRequest: Register an environment's evaluation oracle for score verification (collector/receipts.py). `hmac_key` is the shared receipt-signing key — stored server-side only, NEVER returned by any read endpoint. With `require_receipt`, request_authorization REJECTS scores that don't carry a valid receipt binding score == measured fitness; without it, verification is advisory (`score_verified` is recorded either way).
  - `url` string, nullable
  - `hmac_key` string, required
  - `require_receipt` boolean

## 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)
