Preview explicitly consented workspace image processing
Generated from the checked-in source. Do not edit this reference by hand.
POST /api/v1/organizations/{organization}/projects/{project}/guardrails/image-detectors/{detector}/preview
Workspace write access required. Sends the supplied inline PNG, JPEG or WebP image to a deployment-configured image detector only after workspace authorization, current explicit consent and declared-unmetered checks. Route request body limit is 2 MiB. Decode errors are 400; decode-worker busy/failure is 503. Inspection unavailability is a 200 indeterminate outcome. Does not save or activate a policy, grant dispatch access or integrate customer billing. Cache-Control: no-store.
Operation: previewWorkspaceImageDetector.
Authentication
Section titled “Authentication”Use the credential and permission scope described above. Each object below is an alternative; schemes within one object are required together.
[ { "bearerAuth": [] }]HTTP request
Section titled “HTTP request”Set NIU_ORIGIN to your installation origin (without /v1). Replace path, query and header placeholders with the required values. Query examples use curl 7.87 or newer to encode values with --url-query. Use the credential scope described above; a bearer token must have the authority required by this operation.
curl --fail-with-body -X POST "$NIU_ORIGIN/api/v1/organizations/{organization}/projects/{project}/guardrails/image-detectors/{detector}/preview" \ -H "Authorization: Bearer $NIU_BEARER_TOKEN" \ -H 'Content-Type: application/json' \ --data @request.jsonParameters
Section titled “Parameters”organization
Section titled “organization”Location: path. Required.
{ "type": "string", "format": "uuid"}project
Section titled “project”Location: path. Required.
{ "type": "string", "format": "uuid"}detector
Section titled “detector”Location: path. Required.
{ "type": "string"}Request body
Section titled “Request body”application/json
Section titled “application/json”Required.
{ "type": "object", "additionalProperties": false, "required": [ "consent", "image" ], "properties": { "consent": { "type": "object", "additionalProperties": false, "required": [ "configuration_fingerprint", "consent_to_image_processing" ], "properties": { "configuration_fingerprint": { "type": "string" }, "consent_to_image_processing": { "type": "boolean" } } }, "image": { "type": "string", "description": "Inline data:image reference; bounded PNG, JPEG or WebP decoding." } }}Responses
Section titled “Responses”HTTP 200
Section titled “HTTP 200”Declared metadata or synthetic result; Cache-Control: no-store
Response headers:
{ "Cache-Control": { "schema": { "type": "string" }, "description": "no-store" }}Content type: application/json.
{ "type": "object", "required": [ "outcome", "reason", "synthetic", "enforcement", "policy_activation" ], "properties": { "outcome": { "type": "string", "enum": [ "clear", "matched", "indeterminate" ] }, "reason": { "type": "string", "enum": [ "inspected_image", "image_match", "inspection_unavailable" ] }, "synthetic": { "type": "boolean", "enum": [ true ] }, "enforcement": { "type": "boolean", "enum": [ false ] }, "policy_activation": { "type": "boolean", "enum": [ false ] } }}HTTP 400
Section titled “HTTP 400”Malformed JSON, unknown fields, invalid content, oversized body or missing/stale explicit consent
HTTP 401
Section titled “HTTP 401”Invalid management credential; inference credentials cannot access management endpoints
HTTP 403
Section titled “HTTP 403”Insufficient workspace permission or installation administrator authorization
HTTP 404
Section titled “HTTP 404”Workspace or configured detector not found
HTTP 503
Section titled “HTTP 503”Authorization/storage unavailable or image decode workers unavailable
Behavior and supported scope
Section titled “Behavior and supported scope”Workspace write access required. Sends the supplied inline PNG, JPEG or WebP image to a deployment-configured image detector only after workspace authorization, current explicit consent and declared-unmetered checks. Route request body limit is 2 MiB. Decode errors are 400; decode-worker busy/failure is 503. Inspection unavailability is a 200 indeterminate outcome. Does not save or activate a policy, grant dispatch access or integrate customer billing. Cache-Control: no-store.
Supported scope: implemented