Skip to content
AgentIDDocs

Type at least two characters to search titles, headings and content.

↑ ↓ to navigate↵ to open
AgentID Docs

API reference · Guard

Check a prompt before model execution

Checks a prompt (plus optional context and attachments) against the AI system's guardrails before you call the model. The verdict tells you whether to continue and, when masking is enabled, returns the protected text to send instead of the original.

POSThttps://app.getagentid.com/api/v1/guard
  • allowed: true with transformed_input: send transformed_input (and transformed_attachments) to the model, never the original.
  • allowed: false: do not call the model; reason says why.
  • bypassed: true: AgentID could not complete the check and the system is fail-open.

Masked values are replaced with typed placeholders such as <PERSON_NAME_1> or <EMAIL_1>. When Restore masked values for the end user is enabled for the system, an allowed response also carries client_placeholder_mapping so your application can restore the originals in its own response to the user.

Limits: request body 4 MiB, input and prompt_context 64,000 characters each, at most 4 attachments.

Authentication

Send one of these headers (either is accepted):

x-agentid-api-key: <API key>

AgentID API key of the AI system, for example x-agentid-api-key: sk_live_....

Authorization: Bearer <API key>

The same API key passed as Authorization: Bearer sk_live_....

Request body

application/jsonrequiredGuardRequest

system_idstring<uuid>required

The AI system the API key belongs to.

inputstringrequired

The text to check and mask, usually the latest user message.

max length 64000

prompt_contextstring

Optional surrounding context (for example earlier turns). It helps detection and prompt-injection analysis but is not returned in a transformed form.

max length 64000

modelstring

min length 1 · max length 256

user_idstring

Your identifier of the end user, shown in the Activity log.

min length 1 · max length 128

client_event_idstring<uuid>

Correlation id for this model call. Reuse it on /ingest.

expected_languagesarray<string>

Language hints such as en or cs.

originstringdefault user_input

Use tool_output when the text comes from a tool result rather than the user.

One of: user_input, tool_output

pii_detection_modestringdefault full

minimal requests a fast rule-based retry after a slow or failed full call. It is honoured only as one retry of a full attempt for the same system that started within the last 60 seconds and is named in metadata.minimal_retry_of_client_event_id; otherwise the request runs as full.

One of: full, minimal

attachmentsarray<object>
›Show item attributes
filenamestringrequired

min length 1 · max length 255

mime_typestring

max length 255

mimeTypestring

Alias of mime_type.

max length 255

content_base64string

File bytes, base64-encoded.

max length 6000000

contentBase64string

Alias of content_base64.

max length 6000000

textstring

Extracted text of the attachment.

max length 500000

metadataobject

Free-form telemetry stored with the Guard event.

request_identityobject

Optional client-side identity hints stored with the event for audit.

›Show child attributes
ip_addressstring
user_agentstring
geostring

Country or region hint.

session_idstring

Additional properties are accepted.

client_capabilitiesobject

Optional description of the calling client. Official SDKs fill it automatically.

›Show child attributes
frameworkstring
pii_masking_enabledboolean

Whether the client masks personal data locally before calling Guard.

secret_masking_enabledboolean

Whether the client masks secrets locally before calling Guard.

has_feedback_handlerboolean
sdk_versionstring

Additional properties are accepted.

Example request

curl -X POST "https://app.getagentid.com/api/v1/guard" \
  -H "x-agentid-api-key: $AGENTID_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "system_id": "cf84f936-95bc-45a4-bf98-9a1a16bf29c9",
  "input": "Write a reply to Jana Novakova (jana.novakova@example.com) about her refund.",
  "model": "gpt-4o-mini",
  "user_id": "user-123",
  "client_event_id": "0467f78f-5821-4827-a09b-d59a9b08866c",
  "expected_languages": [
    "en"
  ]
}'

Responses

200Check completed. Read `allowed`: a `200` can also carry `allowed: false`, for

Headers

X-AgentID-Statusstring

BYPASSED_INFRA_ERROR when a fail-open system skipped the check because a dependency failed.

Value: BYPASSED_INFRA_ERROR

›Response schemaGuardResponse
allowedbooleanrequired

Whether you may call the model.

reasonstring

Why the request was blocked or bypassed. Common values: unauthorized, system_id_mismatch, invalid_payload, payload_too_large, prompt_injection_blocked, tool_output_prompt_injection_blocked, database_access_blocked, code_execution_blocked, pii_blocked, secret_blocked, toxicity_blocked, attachment_requires_secure_preprocessing, system_suspended, rate_limited, rate_limited_burst, daily_limit, hourly_token_limit, daily_token_limit, pii_detection_unavailable, semantic_authority_unavailable, circuit_breaker, system_failure, system_failure_db_unavailable. Content-policy blocks use a readable message such as Policy violation: Term blocked by admin.

detected_piiboolean

Whether personal data or secrets were detected in the input or attachments.

checkedboolean
bypassedboolean

True when the check was skipped because of a dependency failure in a fail-open system.

transformed_inputstring

The text to send to the model. Equal to input when nothing was masked.

input_char_countinteger

Length of the received input, so you can confirm nothing was cut.

min 0

transformed_input_completeboolean

True when transformed_input covers the whole input.

transformed_attachmentsarray<object>
›Show item attributes
filenamestringrequired
transformed_textstringrequired
mime_typestring
sourcestring

One of: inline_text, base64_file

extraction_errorstring | null
requires_ocrboolean
ocr_usedboolean

Additional properties are accepted.

client_deanonymization_enabledboolean

Whether this allowed response permits restoring placeholders for the end user.

client_substitute_stylestring

Always tokens (typed placeholders).

Value: tokens

client_placeholder_mappingmap<string, string>

Placeholder-to-original mapping, present only on allowed responses when restoration is enabled. Keep it in memory for this request; never send it to the model provider or into logs.

guard_event_idstring<uuid>
client_event_idstring<uuid>
guard_latency_msinteger

min 0

shadow_modeboolean

True when the system runs in Shadow Mode; nothing is blocked or masked.

simulated_decisionstring

In Shadow Mode, what Active Guard would have done.

One of: allowed, masked, blocked

shadow_blockedboolean
policy_pack_matcher_backendstring

One of: rust_wasm, js_hybrid, legacy_fallback

policy_pack_scan_profilestring

One of: expected_languages, auto_detected, global_high_priority, core_en_fallback

policy_pack_scan_modestring

One of: full, segmented

exotic_language_detectedboolean
langid_primarystring
langid_confidencestring

One of: high, medium, low

langid_secondaryarray<string>
langid_mixedboolean
langid_sourcestring

One of: input_detection, input_detection_with_hint

guard_metadataobject

Diagnostic summary of the decision. Its fields may change.

transparencyobject

Present when transparency metadata injection is enabled for the system.

›Show child attributes
is_ai_generatedboolean

Value: true

disclosurestring
articlestring
injection_modestring

Additional properties are accepted.

{
  "allowed": true,
  "detected_pii": false,
  "transformed_input": "What is the capital of the Czech Republic?",
  "input_char_count": 42,
  "transformed_input_complete": true,
  "client_deanonymization_enabled": false,
  "guard_event_id": "7a7394af-77a9-4d32-a714-ad7af7ab86f3",
  "client_event_id": "0467f78f-5821-4827-a09b-d59a9b08866c",
  "guard_latency_ms": 118
}

400Invalid JSON or a field outside the request schema.

›Response schemaGuardResponse
allowedbooleanrequired

Whether you may call the model.

reasonstring

Why the request was blocked or bypassed. Common values: unauthorized, system_id_mismatch, invalid_payload, payload_too_large, prompt_injection_blocked, tool_output_prompt_injection_blocked, database_access_blocked, code_execution_blocked, pii_blocked, secret_blocked, toxicity_blocked, attachment_requires_secure_preprocessing, system_suspended, rate_limited, rate_limited_burst, daily_limit, hourly_token_limit, daily_token_limit, pii_detection_unavailable, semantic_authority_unavailable, circuit_breaker, system_failure, system_failure_db_unavailable. Content-policy blocks use a readable message such as Policy violation: Term blocked by admin.

detected_piiboolean

Whether personal data or secrets were detected in the input or attachments.

checkedboolean
bypassedboolean

True when the check was skipped because of a dependency failure in a fail-open system.

transformed_inputstring

The text to send to the model. Equal to input when nothing was masked.

input_char_countinteger

Length of the received input, so you can confirm nothing was cut.

min 0

transformed_input_completeboolean

True when transformed_input covers the whole input.

transformed_attachmentsarray<object>
›Show item attributes
filenamestringrequired
transformed_textstringrequired
mime_typestring
sourcestring

One of: inline_text, base64_file

extraction_errorstring | null
requires_ocrboolean
ocr_usedboolean

Additional properties are accepted.

client_deanonymization_enabledboolean

Whether this allowed response permits restoring placeholders for the end user.

client_substitute_stylestring

Always tokens (typed placeholders).

Value: tokens

client_placeholder_mappingmap<string, string>

Placeholder-to-original mapping, present only on allowed responses when restoration is enabled. Keep it in memory for this request; never send it to the model provider or into logs.

guard_event_idstring<uuid>
client_event_idstring<uuid>
guard_latency_msinteger

min 0

shadow_modeboolean

True when the system runs in Shadow Mode; nothing is blocked or masked.

simulated_decisionstring

In Shadow Mode, what Active Guard would have done.

One of: allowed, masked, blocked

shadow_blockedboolean
policy_pack_matcher_backendstring

One of: rust_wasm, js_hybrid, legacy_fallback

policy_pack_scan_profilestring

One of: expected_languages, auto_detected, global_high_priority, core_en_fallback

policy_pack_scan_modestring

One of: full, segmented

exotic_language_detectedboolean
langid_primarystring
langid_confidencestring

One of: high, medium, low

langid_secondaryarray<string>
langid_mixedboolean
langid_sourcestring

One of: input_detection, input_detection_with_hint

guard_metadataobject

Diagnostic summary of the decision. Its fields may change.

transparencyobject

Present when transparency metadata injection is enabled for the system.

›Show child attributes
is_ai_generatedboolean

Value: true

disclosurestring
articlestring
injection_modestring

Additional properties are accepted.

{
  "allowed": false,
  "reason": "invalid_payload"
}

401Missing, invalid or revoked API key, or `system_id` does not match the key.

›Response schemaGuardResponse
allowedbooleanrequired

Whether you may call the model.

reasonstring

Why the request was blocked or bypassed. Common values: unauthorized, system_id_mismatch, invalid_payload, payload_too_large, prompt_injection_blocked, tool_output_prompt_injection_blocked, database_access_blocked, code_execution_blocked, pii_blocked, secret_blocked, toxicity_blocked, attachment_requires_secure_preprocessing, system_suspended, rate_limited, rate_limited_burst, daily_limit, hourly_token_limit, daily_token_limit, pii_detection_unavailable, semantic_authority_unavailable, circuit_breaker, system_failure, system_failure_db_unavailable. Content-policy blocks use a readable message such as Policy violation: Term blocked by admin.

detected_piiboolean

Whether personal data or secrets were detected in the input or attachments.

checkedboolean
bypassedboolean

True when the check was skipped because of a dependency failure in a fail-open system.

transformed_inputstring

The text to send to the model. Equal to input when nothing was masked.

input_char_countinteger

Length of the received input, so you can confirm nothing was cut.

min 0

transformed_input_completeboolean

True when transformed_input covers the whole input.

transformed_attachmentsarray<object>
›Show item attributes
filenamestringrequired
transformed_textstringrequired
mime_typestring
sourcestring

One of: inline_text, base64_file

extraction_errorstring | null
requires_ocrboolean
ocr_usedboolean

Additional properties are accepted.

client_deanonymization_enabledboolean

Whether this allowed response permits restoring placeholders for the end user.

client_substitute_stylestring

Always tokens (typed placeholders).

Value: tokens

client_placeholder_mappingmap<string, string>

Placeholder-to-original mapping, present only on allowed responses when restoration is enabled. Keep it in memory for this request; never send it to the model provider or into logs.

guard_event_idstring<uuid>
client_event_idstring<uuid>
guard_latency_msinteger

min 0

shadow_modeboolean

True when the system runs in Shadow Mode; nothing is blocked or masked.

simulated_decisionstring

In Shadow Mode, what Active Guard would have done.

One of: allowed, masked, blocked

shadow_blockedboolean
policy_pack_matcher_backendstring

One of: rust_wasm, js_hybrid, legacy_fallback

policy_pack_scan_profilestring

One of: expected_languages, auto_detected, global_high_priority, core_en_fallback

policy_pack_scan_modestring

One of: full, segmented

exotic_language_detectedboolean
langid_primarystring
langid_confidencestring

One of: high, medium, low

langid_secondaryarray<string>
langid_mixedboolean
langid_sourcestring

One of: input_detection, input_detection_with_hint

guard_metadataobject

Diagnostic summary of the decision. Its fields may change.

transparencyobject

Present when transparency metadata injection is enabled for the system.

›Show child attributes
is_ai_generatedboolean

Value: true

disclosurestring
articlestring
injection_modestring

Additional properties are accepted.

{
  "allowed": false,
  "reason": "unauthorized"
}

403Blocked by a guardrail, a content policy or the kill switch.

›Response schemaGuardResponse
allowedbooleanrequired

Whether you may call the model.

reasonstring

Why the request was blocked or bypassed. Common values: unauthorized, system_id_mismatch, invalid_payload, payload_too_large, prompt_injection_blocked, tool_output_prompt_injection_blocked, database_access_blocked, code_execution_blocked, pii_blocked, secret_blocked, toxicity_blocked, attachment_requires_secure_preprocessing, system_suspended, rate_limited, rate_limited_burst, daily_limit, hourly_token_limit, daily_token_limit, pii_detection_unavailable, semantic_authority_unavailable, circuit_breaker, system_failure, system_failure_db_unavailable. Content-policy blocks use a readable message such as Policy violation: Term blocked by admin.

detected_piiboolean

Whether personal data or secrets were detected in the input or attachments.

checkedboolean
bypassedboolean

True when the check was skipped because of a dependency failure in a fail-open system.

transformed_inputstring

The text to send to the model. Equal to input when nothing was masked.

input_char_countinteger

Length of the received input, so you can confirm nothing was cut.

min 0

transformed_input_completeboolean

True when transformed_input covers the whole input.

transformed_attachmentsarray<object>
›Show item attributes
filenamestringrequired
transformed_textstringrequired
mime_typestring
sourcestring

One of: inline_text, base64_file

extraction_errorstring | null
requires_ocrboolean
ocr_usedboolean

Additional properties are accepted.

client_deanonymization_enabledboolean

Whether this allowed response permits restoring placeholders for the end user.

client_substitute_stylestring

Always tokens (typed placeholders).

Value: tokens

client_placeholder_mappingmap<string, string>

Placeholder-to-original mapping, present only on allowed responses when restoration is enabled. Keep it in memory for this request; never send it to the model provider or into logs.

guard_event_idstring<uuid>
client_event_idstring<uuid>
guard_latency_msinteger

min 0

shadow_modeboolean

True when the system runs in Shadow Mode; nothing is blocked or masked.

simulated_decisionstring

In Shadow Mode, what Active Guard would have done.

One of: allowed, masked, blocked

shadow_blockedboolean
policy_pack_matcher_backendstring

One of: rust_wasm, js_hybrid, legacy_fallback

policy_pack_scan_profilestring

One of: expected_languages, auto_detected, global_high_priority, core_en_fallback

policy_pack_scan_modestring

One of: full, segmented

exotic_language_detectedboolean
langid_primarystring
langid_confidencestring

One of: high, medium, low

langid_secondaryarray<string>
langid_mixedboolean
langid_sourcestring

One of: input_detection, input_detection_with_hint

guard_metadataobject

Diagnostic summary of the decision. Its fields may change.

transparencyobject

Present when transparency metadata injection is enabled for the system.

›Show child attributes
is_ai_generatedboolean

Value: true

disclosurestring
articlestring
injection_modestring

Additional properties are accepted.

{
  "allowed": false,
  "reason": "prompt_injection_blocked"
}

413Request body exceeds 4 MiB.

›Response schemaGuardResponse
allowedbooleanrequired

Whether you may call the model.

reasonstring

Why the request was blocked or bypassed. Common values: unauthorized, system_id_mismatch, invalid_payload, payload_too_large, prompt_injection_blocked, tool_output_prompt_injection_blocked, database_access_blocked, code_execution_blocked, pii_blocked, secret_blocked, toxicity_blocked, attachment_requires_secure_preprocessing, system_suspended, rate_limited, rate_limited_burst, daily_limit, hourly_token_limit, daily_token_limit, pii_detection_unavailable, semantic_authority_unavailable, circuit_breaker, system_failure, system_failure_db_unavailable. Content-policy blocks use a readable message such as Policy violation: Term blocked by admin.

detected_piiboolean

Whether personal data or secrets were detected in the input or attachments.

checkedboolean
bypassedboolean

True when the check was skipped because of a dependency failure in a fail-open system.

transformed_inputstring

The text to send to the model. Equal to input when nothing was masked.

input_char_countinteger

Length of the received input, so you can confirm nothing was cut.

min 0

transformed_input_completeboolean

True when transformed_input covers the whole input.

transformed_attachmentsarray<object>
›Show item attributes
filenamestringrequired
transformed_textstringrequired
mime_typestring
sourcestring

One of: inline_text, base64_file

extraction_errorstring | null
requires_ocrboolean
ocr_usedboolean

Additional properties are accepted.

client_deanonymization_enabledboolean

Whether this allowed response permits restoring placeholders for the end user.

client_substitute_stylestring

Always tokens (typed placeholders).

Value: tokens

client_placeholder_mappingmap<string, string>

Placeholder-to-original mapping, present only on allowed responses when restoration is enabled. Keep it in memory for this request; never send it to the model provider or into logs.

guard_event_idstring<uuid>
client_event_idstring<uuid>
guard_latency_msinteger

min 0

shadow_modeboolean

True when the system runs in Shadow Mode; nothing is blocked or masked.

simulated_decisionstring

In Shadow Mode, what Active Guard would have done.

One of: allowed, masked, blocked

shadow_blockedboolean
policy_pack_matcher_backendstring

One of: rust_wasm, js_hybrid, legacy_fallback

policy_pack_scan_profilestring

One of: expected_languages, auto_detected, global_high_priority, core_en_fallback

policy_pack_scan_modestring

One of: full, segmented

exotic_language_detectedboolean
langid_primarystring
langid_confidencestring

One of: high, medium, low

langid_secondaryarray<string>
langid_mixedboolean
langid_sourcestring

One of: input_detection, input_detection_with_hint

guard_metadataobject

Diagnostic summary of the decision. Its fields may change.

transparencyobject

Present when transparency metadata injection is enabled for the system.

›Show child attributes
is_ai_generatedboolean

Value: true

disclosurestring
articlestring
injection_modestring

Additional properties are accepted.

{
  "allowed": false,
  "reason": "payload_too_large"
}

429Rate limit or quota exceeded.

Headers

Retry-Afterinteger

Seconds to wait before retrying.

min 1

X-RateLimit-Limitinteger

Maximum requests allowed in the current window.

X-RateLimit-Remaininginteger

Requests remaining in the current window.

›Response schemaGuardResponse
allowedbooleanrequired

Whether you may call the model.

reasonstring

Why the request was blocked or bypassed. Common values: unauthorized, system_id_mismatch, invalid_payload, payload_too_large, prompt_injection_blocked, tool_output_prompt_injection_blocked, database_access_blocked, code_execution_blocked, pii_blocked, secret_blocked, toxicity_blocked, attachment_requires_secure_preprocessing, system_suspended, rate_limited, rate_limited_burst, daily_limit, hourly_token_limit, daily_token_limit, pii_detection_unavailable, semantic_authority_unavailable, circuit_breaker, system_failure, system_failure_db_unavailable. Content-policy blocks use a readable message such as Policy violation: Term blocked by admin.

detected_piiboolean

Whether personal data or secrets were detected in the input or attachments.

checkedboolean
bypassedboolean

True when the check was skipped because of a dependency failure in a fail-open system.

transformed_inputstring

The text to send to the model. Equal to input when nothing was masked.

input_char_countinteger

Length of the received input, so you can confirm nothing was cut.

min 0

transformed_input_completeboolean

True when transformed_input covers the whole input.

transformed_attachmentsarray<object>
›Show item attributes
filenamestringrequired
transformed_textstringrequired
mime_typestring
sourcestring

One of: inline_text, base64_file

extraction_errorstring | null
requires_ocrboolean
ocr_usedboolean

Additional properties are accepted.

client_deanonymization_enabledboolean

Whether this allowed response permits restoring placeholders for the end user.

client_substitute_stylestring

Always tokens (typed placeholders).

Value: tokens

client_placeholder_mappingmap<string, string>

Placeholder-to-original mapping, present only on allowed responses when restoration is enabled. Keep it in memory for this request; never send it to the model provider or into logs.

guard_event_idstring<uuid>
client_event_idstring<uuid>
guard_latency_msinteger

min 0

shadow_modeboolean

True when the system runs in Shadow Mode; nothing is blocked or masked.

simulated_decisionstring

In Shadow Mode, what Active Guard would have done.

One of: allowed, masked, blocked

shadow_blockedboolean
policy_pack_matcher_backendstring

One of: rust_wasm, js_hybrid, legacy_fallback

policy_pack_scan_profilestring

One of: expected_languages, auto_detected, global_high_priority, core_en_fallback

policy_pack_scan_modestring

One of: full, segmented

exotic_language_detectedboolean
langid_primarystring
langid_confidencestring

One of: high, medium, low

langid_secondaryarray<string>
langid_mixedboolean
langid_sourcestring

One of: input_detection, input_detection_with_hint

guard_metadataobject

Diagnostic summary of the decision. Its fields may change.

transparencyobject

Present when transparency metadata injection is enabled for the system.

›Show child attributes
is_ai_generatedboolean

Value: true

disclosurestring
articlestring
injection_modestring

Additional properties are accepted.

{
  "allowed": false,
  "reason": "rate_limited"
}

500Internal processing failure.

›Response schemaGuardResponse
allowedbooleanrequired

Whether you may call the model.

reasonstring

Why the request was blocked or bypassed. Common values: unauthorized, system_id_mismatch, invalid_payload, payload_too_large, prompt_injection_blocked, tool_output_prompt_injection_blocked, database_access_blocked, code_execution_blocked, pii_blocked, secret_blocked, toxicity_blocked, attachment_requires_secure_preprocessing, system_suspended, rate_limited, rate_limited_burst, daily_limit, hourly_token_limit, daily_token_limit, pii_detection_unavailable, semantic_authority_unavailable, circuit_breaker, system_failure, system_failure_db_unavailable. Content-policy blocks use a readable message such as Policy violation: Term blocked by admin.

detected_piiboolean

Whether personal data or secrets were detected in the input or attachments.

checkedboolean
bypassedboolean

True when the check was skipped because of a dependency failure in a fail-open system.

transformed_inputstring

The text to send to the model. Equal to input when nothing was masked.

input_char_countinteger

Length of the received input, so you can confirm nothing was cut.

min 0

transformed_input_completeboolean

True when transformed_input covers the whole input.

transformed_attachmentsarray<object>
›Show item attributes
filenamestringrequired
transformed_textstringrequired
mime_typestring
sourcestring

One of: inline_text, base64_file

extraction_errorstring | null
requires_ocrboolean
ocr_usedboolean

Additional properties are accepted.

client_deanonymization_enabledboolean

Whether this allowed response permits restoring placeholders for the end user.

client_substitute_stylestring

Always tokens (typed placeholders).

Value: tokens

client_placeholder_mappingmap<string, string>

Placeholder-to-original mapping, present only on allowed responses when restoration is enabled. Keep it in memory for this request; never send it to the model provider or into logs.

guard_event_idstring<uuid>
client_event_idstring<uuid>
guard_latency_msinteger

min 0

shadow_modeboolean

True when the system runs in Shadow Mode; nothing is blocked or masked.

simulated_decisionstring

In Shadow Mode, what Active Guard would have done.

One of: allowed, masked, blocked

shadow_blockedboolean
policy_pack_matcher_backendstring

One of: rust_wasm, js_hybrid, legacy_fallback

policy_pack_scan_profilestring

One of: expected_languages, auto_detected, global_high_priority, core_en_fallback

policy_pack_scan_modestring

One of: full, segmented

exotic_language_detectedboolean
langid_primarystring
langid_confidencestring

One of: high, medium, low

langid_secondaryarray<string>
langid_mixedboolean
langid_sourcestring

One of: input_detection, input_detection_with_hint

guard_metadataobject

Diagnostic summary of the decision. Its fields may change.

transparencyobject

Present when transparency metadata injection is enabled for the system.

›Show child attributes
is_ai_generatedboolean

Value: true

disclosurestring
articlestring
injection_modestring

Additional properties are accepted.

{
  "allowed": false,
  "reason": "server_error"
}

503A dependency failed in a fail-closed system, or the automatic circuit breaker

›Response schemaGuardResponse
allowedbooleanrequired

Whether you may call the model.

reasonstring

Why the request was blocked or bypassed. Common values: unauthorized, system_id_mismatch, invalid_payload, payload_too_large, prompt_injection_blocked, tool_output_prompt_injection_blocked, database_access_blocked, code_execution_blocked, pii_blocked, secret_blocked, toxicity_blocked, attachment_requires_secure_preprocessing, system_suspended, rate_limited, rate_limited_burst, daily_limit, hourly_token_limit, daily_token_limit, pii_detection_unavailable, semantic_authority_unavailable, circuit_breaker, system_failure, system_failure_db_unavailable. Content-policy blocks use a readable message such as Policy violation: Term blocked by admin.

detected_piiboolean

Whether personal data or secrets were detected in the input or attachments.

checkedboolean
bypassedboolean

True when the check was skipped because of a dependency failure in a fail-open system.

transformed_inputstring

The text to send to the model. Equal to input when nothing was masked.

input_char_countinteger

Length of the received input, so you can confirm nothing was cut.

min 0

transformed_input_completeboolean

True when transformed_input covers the whole input.

transformed_attachmentsarray<object>
›Show item attributes
filenamestringrequired
transformed_textstringrequired
mime_typestring
sourcestring

One of: inline_text, base64_file

extraction_errorstring | null
requires_ocrboolean
ocr_usedboolean

Additional properties are accepted.

client_deanonymization_enabledboolean

Whether this allowed response permits restoring placeholders for the end user.

client_substitute_stylestring

Always tokens (typed placeholders).

Value: tokens

client_placeholder_mappingmap<string, string>

Placeholder-to-original mapping, present only on allowed responses when restoration is enabled. Keep it in memory for this request; never send it to the model provider or into logs.

guard_event_idstring<uuid>
client_event_idstring<uuid>
guard_latency_msinteger

min 0

shadow_modeboolean

True when the system runs in Shadow Mode; nothing is blocked or masked.

simulated_decisionstring

In Shadow Mode, what Active Guard would have done.

One of: allowed, masked, blocked

shadow_blockedboolean
policy_pack_matcher_backendstring

One of: rust_wasm, js_hybrid, legacy_fallback

policy_pack_scan_profilestring

One of: expected_languages, auto_detected, global_high_priority, core_en_fallback

policy_pack_scan_modestring

One of: full, segmented

exotic_language_detectedboolean
langid_primarystring
langid_confidencestring

One of: high, medium, low

langid_secondaryarray<string>
langid_mixedboolean
langid_sourcestring

One of: input_detection, input_detection_with_hint

guard_metadataobject

Diagnostic summary of the decision. Its fields may change.

transparencyobject

Present when transparency metadata injection is enabled for the system.

›Show child attributes
is_ai_generatedboolean

Value: true

disclosurestring
articlestring
injection_modestring

Additional properties are accepted.

{
  "allowed": false,
  "reason": "system_failure"
}