latestOpenAPI 3.1.02026-08-15143165213.3 KB

d728989c2568

Internal

Create or replace a shadow-mode prompt-capture scope (platform admin)

Upserts the (orgId, modelId) capture scope the inference gateway polls (notes/shadow-capture-design.md): while live, matching request/response payloads are mirrored to Firehose -> S3 for offline replay/dataset building. ttlMinutes is required (max 1440/24h): a capture toggle that outlives its purpose is a privacy incident, so every scope self-expires. A second PUT for the same (orgId, modelId) overwrites the first, which is how an operator extends a scope's TTL.

put/v1/admin/inference/shadow-capture

Request body

allowAllOrgsboolean

Must be true when orgId is "*"; the second-confirm switch fleet-wide capture requires

captureResponseboolean

Defaults to false (request + metadata only) when omitted

enabledboolean required
modelIdstring required

Public catalog model to scope capture to, or "*" for every model

notestring
orgIdstring required

Org to scope capture to, or "*" for every org (requires allowAllOrgs: true)

sampleRatenumber double

Defaults to 1.0 (capture every matching request) when omitted

ttlMinutesinteger required

Required. How long the scope stays live from now; the design's mandatory auto-off (max 24h).

Response

Saved

allowAllOrgsboolean

Required (true) for a scope whose orgId is "*"; ignored otherwise

captureResponseboolean required

Also mirror the response payload (unary: scrubbed body; streaming: usage + timing only, see the gateway's capture-point limitation note). false captures the request + metadata only.

createdAtstring
createdBystring
enabledboolean required
expiresAtstring required

RFC3339 UTC; the scope self-expires here regardless of the DynamoDB TTL sweep timing. Mandatory: a capture toggle that outlives its purpose is a privacy incident.

modelIdstring required

Public catalog model this scope governs, or "*" for every model

notestring

Free-text operator note, e.g. what dataset this scope is for

orgIdstring required

Org this scope governs, or "*" for every org (requires allowAllOrgs)

sampleRatenumber double required

Fraction of matching requests captured: 0 captures nothing, 1 captures every match

updatedAtstring