Skip to navigation

Update Project PI Settings

Replace the project’s prompt injection override as a whole. Fields you omit inherit the organization’s value; send a field as null to clear it back to inheritance. An empty body means inherit everything, the same as DELETE. A project pinned to an API key uses this policy as written. A project named per request (project_id body field or X-Project-Id header) can only tighten the organization policy; anything that loosens it is ignored at request time.

Needs manage_security_rules or manage_projects.

Authentication

AuthorizationBearer

A management key (mgmt_...), sent as Authorization: Bearer <key>. Reading /v1/routing-policies also accepts the organization’s gateway API keys; writing there needs a management key.

Path parameters

project_idstringRequiredformat: "uuid"

The project’s id.

Request

This endpoint expects an object.
pi_allowlist_patternslist of strings or nullOptional

Regular expressions whose matching prompt segments skip screening. A project’s patterns add to the organization’s, never replacing them. A pattern that matches ordinary text, such as .*, is ignored.

pi_block_thresholddouble or nullOptional0-1

Direct injection: a prompt segment is blocked when its score, from 0 to 1, reaches this value. At least the organization’s pi_pass_threshold.

pi_fail_closedboolean or nullOptional

Reject requests, with code: "sidecar_error", when screening is unavailable. false lets them through unscreened.

pi_indirect_modeenum or nullOptional

Indirect injection, in tool results and documents: off, alert or block. A separate axis from pi_mode.

Allowed values:
pi_modeenum or nullOptional

Direct injection, in the prompt a user sends: off, alert (score and record, never block) or block.

Allowed values:
pi_output_actionenum or nullOptional

What the response-side check does with a leaked credential, such as an API key: redact replaces it with a placeholder, observe only records it. Other values behave like observe.

Allowed values:
pi_tier2a_block_thresholddouble or nullOptional0-1

Indirect injection: the score, from 0 to 1, at which the heuristic signal fires.

pi_tier2b_block_thresholddouble or nullOptional0-1

Indirect injection: the score, from 0 to 1, at which the similarity-to-known-attacks signal fires.

Response

The project's updated prompt injection settings
effectiveobject
The policy a request to this project runs under, when the project is pinned to an API key.
inherited_fieldslist of strings
Fields taken from the organization policy because the project doesn't set them.
overrideobject
What the project sets. Fields it doesn't set are null.

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
502
Bad Gateway Error