Check a final model request or complete raw response

POST
/v1/context/check

Read-only privacy and current context-reuse admission. This operation does not retrieve, rewrite, call a model, or grant model execution authority. Only allow with complete coverage permits the corresponding phase. The execution adapter must send or release exactly the approved bytes before their deadline.

Authorization

BearerAuth
AuthorizationBearer <token>

Bearer credential resolved to an opaque authenticated Principal by the Server deployment.

In: header

Header Parameters

X-PowerContext-Resolve-Target?boolean

Only for before_send by an authenticated service principal authorized for gateway.invoke on this Scope as well as scope.read. Neither scope.read nor server.admin implies invocation.

Defaultfalse

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/context/check" \  -H "Content-Type: application/json" \  -d '{    "scope_id": "string",    "phase": "before_send",    "target_profile": "string",    "payload": {      "schema": "powercontext.model-json-payload.v1",      "headers": {        "property1": "string",        "property2": "string"      },      "body": "string"    },    "prepared_contexts": [      {        "binding": "string",        "location": {          "schema": "powercontext.model-json-text-location.v1",          "pointer": "string",          "start_byte": 0,          "end_byte": 1        }      }    ]  }'
{  "schema": "powercontext.context-check.v1",  "phase": "before_send",  "decision": "allow",  "reason_codes": [    "string"  ],  "coverage": {    "profile": "text-and-tools.v1",    "complete": true  },  "policy_version": "string",  "valid_until": "2019-08-24T14:15:22Z",  "correlate_until": "2019-08-24T14:15:22Z",  "binding": "string",  "target_endpoint": "string",  "target_protocol": "openai-chat"}