Skip to content

API changelog

Human record of the versioned public HTTP inspect contract (ADR 0014). Separate from the Detector changelog. Breaking changes require a version bump (new URL major + OpenAPI major + an entry here). Wire shape: openapi/openapi.json.

Repo source: docs/api-changelog.md.

Additive under URL major v1 (ADR 0014 decision 3; ADR 0048 / #204).

  • Optional request field preset: chatbot, rag or agent (null or omitted = default table). It selects which source rules produce enforcement and does nothing unless enforce is true. Findings, decision, usage and errors are identical for every preset. An unknown value is 400 invalid_request.
  • With a finding: chatbot blocks user_prompt only; rag blocks retrieved_document only; agent blocks retrieved_document, tool_output and tool_description. Everything else, and every request without findings, is allow. It is a recommendation: you apply it.
  • A deployment older than 0.6.0 rejects preset with 400 invalid_request (unknown field). OpenAPI document revision 0.6.0.

Additive under URL major v1 (ADR 0014 decision 3; ADR 0047 / #205, #203).

  • Optional request field enforce (boolean, default false). When true, the success body includes enforcement: allow or block. decision (no_findings | review) is unchanged.
  • Optional success field enforcement, present only when enforce is true. A finding in retrieved_document, tool_output or tool_description gives block; user_prompt and no findings give allow. It is a recommendation: you apply it. A failed detector is still an error, never allow.
  • A deployment older than 0.5.0 rejects enforce with 400 invalid_request (unknown field). OpenAPI document revision 0.5.0.
  • Successful prompt_injection inspections include the optional boolean prompt_injection_truncated. true means the model inspected a prefix, even if decision is no_findings. false means the entire submitted text fit in the model context. Other checks can complete over the full text, and secrets-only responses omit the field. Treat an absent field as unknown when talking to older deployments.
  • The /v1 route and error responses use the existing contract. The OpenAPI document revision is 0.4.0.

Additive under URL major v1.

  • Optional request field secrets_mode: report (default when omitted) or redact (#206 / ADR 0017).
  • Optional success field redacted_content when secrets_mode is redact (MVP tokens → [REDACTED]). Omitted in report mode.
  • OpenAPI document revision 0.3.0.

Additive under URL major v1.

  • New ErrorCode: detector_failed when a registered detector fails to complete (#132 / ADR 0005).
  • Documented error statuses: 400, 401, 409, 413, 422, 429, 500, 503 (detector_failed with ErrorBody on inspect). Not Polar webhook empty-body 503.
  • OpenAPI document revision 0.2.0.

Frozen baseline for URL major v1.

  • Public route: Bearer-authenticated POST /v1/inspect. POST /v1/classify is not mounted.
  • OpenAPI document revision 0.1.0 matches the running route and error schema.
  • Required header: Idempotency-Key.
  • Request body: content, source, checks.
  • Success body: request_id, decision, findings, usage.
  • Documented error statuses: 400, 401, 409, 413, 422, 429, 500.
  • Not in this freeze: accounts/keys/health/billing routes; published numeric limits; SDK registry publish; detector version semantics.