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.
https://app.getagentid.com/api/v1/guardallowed: truewithtransformed_input: sendtransformed_input(andtransformed_attachments) to the model, never the original.allowed: false: do not call the model;reasonsays 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>requiredThe AI system the API key belongs to.
inputstringrequiredThe text to check and mask, usually the latest user message.
max length 64000
prompt_contextstringOptional surrounding context (for example earlier turns). It helps detection and prompt-injection analysis but is not returned in a transformed form.
max length 64000
modelstringmin length 1 · max length 256
user_idstringYour 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
enorcs.originstringdefaultuser_inputUse
tool_outputwhen the text comes from a tool result rather than the user.One of:
user_input,tool_outputpii_detection_modestringdefaultfullminimalrequests a fast rule-based retry after a slow or failedfullcall. It is honoured only as one retry of afullattempt for the same system that started within the last 60 seconds and is named inmetadata.minimal_retry_of_client_event_id; otherwise the request runs asfull.One of:
full,minimalattachmentsarray<object>›Show item attributes
filenamestringrequiredmin length 1 · max length 255
mime_typestringmax length 255
mimeTypestringAlias of
mime_type.max length 255
content_base64stringFile bytes, base64-encoded.
max length 6000000
contentBase64stringAlias of
content_base64.max length 6000000
textstringExtracted text of the attachment.
max length 500000
metadataobjectFree-form telemetry stored with the Guard event.
request_identityobjectOptional client-side identity hints stored with the event for audit.
›Show child attributes
ip_addressstringuser_agentstringgeostringCountry or region hint.
session_idstring
Additional properties are accepted.
client_capabilitiesobjectOptional description of the calling client. Official SDKs fill it automatically.
›Show child attributes
frameworkstringpii_masking_enabledbooleanWhether the client masks personal data locally before calling Guard.
secret_masking_enabledbooleanWhether the client masks secrets locally before calling Guard.
has_feedback_handlerbooleansdk_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"
]
}'const response = await fetch("https://app.getagentid.com/api/v1/guard", {
method: "POST",
headers: {
"x-agentid-api-key": process.env.AGENTID_API_KEY!,
"Content-Type": "application/json",
},
body: JSON.stringify({
"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"
]
}),
});
if (!response.ok) throw new Error(`AgentID request failed: ${response.status}`);
const data = await response.json();import os
import requests
response = requests.post(
"https://app.getagentid.com/api/v1/guard",
headers={"x-agentid-api-key": os.environ["AGENTID_API_KEY"]},
json={
"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",
],
},
timeout=10,
)
response.raise_for_status()
data = response.json()Responses
200Check completed. Read `allowed`: a `200` can also carry `allowed: false`, for
Headers
X-AgentID-StatusstringBYPASSED_INFRA_ERRORwhen a fail-open system skipped the check because a dependency failed.Value:
BYPASSED_INFRA_ERROR
›Response schemaGuardResponse
allowedbooleanrequiredWhether you may call the model.
reasonstringWhy 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 asPolicy violation: Term blocked by admin.detected_piibooleanWhether personal data or secrets were detected in the input or attachments.
checkedbooleanbypassedbooleanTrue when the check was skipped because of a dependency failure in a fail-open system.
transformed_inputstringThe text to send to the model. Equal to
inputwhen nothing was masked.input_char_countintegerLength of the received
input, so you can confirm nothing was cut.min 0
transformed_input_completebooleanTrue when
transformed_inputcovers the wholeinput.transformed_attachmentsarray<object>›Show item attributes
filenamestringrequiredtransformed_textstringrequiredmime_typestringsourcestringOne of:
inline_text,base64_fileextraction_errorstring | nullrequires_ocrbooleanocr_usedboolean
Additional properties are accepted.
client_deanonymization_enabledbooleanWhether this allowed response permits restoring placeholders for the end user.
client_substitute_stylestringAlways
tokens(typed placeholders).Value:
tokensclient_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_msintegermin 0
shadow_modebooleanTrue when the system runs in Shadow Mode; nothing is blocked or masked.
simulated_decisionstringIn Shadow Mode, what Active Guard would have done.
One of:
allowed,masked,blockedshadow_blockedbooleanpolicy_pack_matcher_backendstringOne of:
rust_wasm,js_hybrid,legacy_fallbackpolicy_pack_scan_profilestringOne of:
expected_languages,auto_detected,global_high_priority,core_en_fallbackpolicy_pack_scan_modestringOne of:
full,segmentedexotic_language_detectedbooleanlangid_primarystringlangid_confidencestringOne of:
high,medium,lowlangid_secondaryarray<string>langid_mixedbooleanlangid_sourcestringOne of:
input_detection,input_detection_with_hintguard_metadataobjectDiagnostic summary of the decision. Its fields may change.
transparencyobjectPresent when transparency metadata injection is enabled for the system.
›Show child attributes
is_ai_generatedbooleanValue:
truedisclosurestringarticlestringinjection_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
}{
"allowed": true,
"detected_pii": true,
"transformed_input": "Write a reply to <PERSON_NAME_1> (<EMAIL_1>) about her refund.",
"input_char_count": 77,
"transformed_input_complete": true,
"client_deanonymization_enabled": true,
"client_substitute_style": "tokens",
"client_placeholder_mapping": {
"<PERSON_NAME_1>": "Jana Novakova",
"<EMAIL_1>": "jana.novakova@example.com"
},
"guard_event_id": "9c1d1b8e-3f5a-4c8e-9a51-0f4f2e5c7d10",
"client_event_id": "0467f78f-5821-4827-a09b-d59a9b08866c",
"guard_latency_ms": 840
}{
"allowed": true,
"bypassed": true,
"reason": "system_failure_db_unavailable"
}{
"allowed": false,
"reason": "pii_detection_unavailable"
}400Invalid JSON or a field outside the request schema.
›Response schemaGuardResponse
allowedbooleanrequiredWhether you may call the model.
reasonstringWhy 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 asPolicy violation: Term blocked by admin.detected_piibooleanWhether personal data or secrets were detected in the input or attachments.
checkedbooleanbypassedbooleanTrue when the check was skipped because of a dependency failure in a fail-open system.
transformed_inputstringThe text to send to the model. Equal to
inputwhen nothing was masked.input_char_countintegerLength of the received
input, so you can confirm nothing was cut.min 0
transformed_input_completebooleanTrue when
transformed_inputcovers the wholeinput.transformed_attachmentsarray<object>›Show item attributes
filenamestringrequiredtransformed_textstringrequiredmime_typestringsourcestringOne of:
inline_text,base64_fileextraction_errorstring | nullrequires_ocrbooleanocr_usedboolean
Additional properties are accepted.
client_deanonymization_enabledbooleanWhether this allowed response permits restoring placeholders for the end user.
client_substitute_stylestringAlways
tokens(typed placeholders).Value:
tokensclient_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_msintegermin 0
shadow_modebooleanTrue when the system runs in Shadow Mode; nothing is blocked or masked.
simulated_decisionstringIn Shadow Mode, what Active Guard would have done.
One of:
allowed,masked,blockedshadow_blockedbooleanpolicy_pack_matcher_backendstringOne of:
rust_wasm,js_hybrid,legacy_fallbackpolicy_pack_scan_profilestringOne of:
expected_languages,auto_detected,global_high_priority,core_en_fallbackpolicy_pack_scan_modestringOne of:
full,segmentedexotic_language_detectedbooleanlangid_primarystringlangid_confidencestringOne of:
high,medium,lowlangid_secondaryarray<string>langid_mixedbooleanlangid_sourcestringOne of:
input_detection,input_detection_with_hintguard_metadataobjectDiagnostic summary of the decision. Its fields may change.
transparencyobjectPresent when transparency metadata injection is enabled for the system.
›Show child attributes
is_ai_generatedbooleanValue:
truedisclosurestringarticlestringinjection_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
allowedbooleanrequiredWhether you may call the model.
reasonstringWhy 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 asPolicy violation: Term blocked by admin.detected_piibooleanWhether personal data or secrets were detected in the input or attachments.
checkedbooleanbypassedbooleanTrue when the check was skipped because of a dependency failure in a fail-open system.
transformed_inputstringThe text to send to the model. Equal to
inputwhen nothing was masked.input_char_countintegerLength of the received
input, so you can confirm nothing was cut.min 0
transformed_input_completebooleanTrue when
transformed_inputcovers the wholeinput.transformed_attachmentsarray<object>›Show item attributes
filenamestringrequiredtransformed_textstringrequiredmime_typestringsourcestringOne of:
inline_text,base64_fileextraction_errorstring | nullrequires_ocrbooleanocr_usedboolean
Additional properties are accepted.
client_deanonymization_enabledbooleanWhether this allowed response permits restoring placeholders for the end user.
client_substitute_stylestringAlways
tokens(typed placeholders).Value:
tokensclient_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_msintegermin 0
shadow_modebooleanTrue when the system runs in Shadow Mode; nothing is blocked or masked.
simulated_decisionstringIn Shadow Mode, what Active Guard would have done.
One of:
allowed,masked,blockedshadow_blockedbooleanpolicy_pack_matcher_backendstringOne of:
rust_wasm,js_hybrid,legacy_fallbackpolicy_pack_scan_profilestringOne of:
expected_languages,auto_detected,global_high_priority,core_en_fallbackpolicy_pack_scan_modestringOne of:
full,segmentedexotic_language_detectedbooleanlangid_primarystringlangid_confidencestringOne of:
high,medium,lowlangid_secondaryarray<string>langid_mixedbooleanlangid_sourcestringOne of:
input_detection,input_detection_with_hintguard_metadataobjectDiagnostic summary of the decision. Its fields may change.
transparencyobjectPresent when transparency metadata injection is enabled for the system.
›Show child attributes
is_ai_generatedbooleanValue:
truedisclosurestringarticlestringinjection_modestring
Additional properties are accepted.
{
"allowed": false,
"reason": "unauthorized"
}{
"allowed": false,
"reason": "system_id_mismatch"
}403Blocked by a guardrail, a content policy or the kill switch.
›Response schemaGuardResponse
allowedbooleanrequiredWhether you may call the model.
reasonstringWhy 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 asPolicy violation: Term blocked by admin.detected_piibooleanWhether personal data or secrets were detected in the input or attachments.
checkedbooleanbypassedbooleanTrue when the check was skipped because of a dependency failure in a fail-open system.
transformed_inputstringThe text to send to the model. Equal to
inputwhen nothing was masked.input_char_countintegerLength of the received
input, so you can confirm nothing was cut.min 0
transformed_input_completebooleanTrue when
transformed_inputcovers the wholeinput.transformed_attachmentsarray<object>›Show item attributes
filenamestringrequiredtransformed_textstringrequiredmime_typestringsourcestringOne of:
inline_text,base64_fileextraction_errorstring | nullrequires_ocrbooleanocr_usedboolean
Additional properties are accepted.
client_deanonymization_enabledbooleanWhether this allowed response permits restoring placeholders for the end user.
client_substitute_stylestringAlways
tokens(typed placeholders).Value:
tokensclient_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_msintegermin 0
shadow_modebooleanTrue when the system runs in Shadow Mode; nothing is blocked or masked.
simulated_decisionstringIn Shadow Mode, what Active Guard would have done.
One of:
allowed,masked,blockedshadow_blockedbooleanpolicy_pack_matcher_backendstringOne of:
rust_wasm,js_hybrid,legacy_fallbackpolicy_pack_scan_profilestringOne of:
expected_languages,auto_detected,global_high_priority,core_en_fallbackpolicy_pack_scan_modestringOne of:
full,segmentedexotic_language_detectedbooleanlangid_primarystringlangid_confidencestringOne of:
high,medium,lowlangid_secondaryarray<string>langid_mixedbooleanlangid_sourcestringOne of:
input_detection,input_detection_with_hintguard_metadataobjectDiagnostic summary of the decision. Its fields may change.
transparencyobjectPresent when transparency metadata injection is enabled for the system.
›Show child attributes
is_ai_generatedbooleanValue:
truedisclosurestringarticlestringinjection_modestring
Additional properties are accepted.
{
"allowed": false,
"reason": "prompt_injection_blocked"
}{
"allowed": false,
"reason": "pii_blocked"
}{
"allowed": false,
"reason": "system_suspended"
}413Request body exceeds 4 MiB.
›Response schemaGuardResponse
allowedbooleanrequiredWhether you may call the model.
reasonstringWhy 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 asPolicy violation: Term blocked by admin.detected_piibooleanWhether personal data or secrets were detected in the input or attachments.
checkedbooleanbypassedbooleanTrue when the check was skipped because of a dependency failure in a fail-open system.
transformed_inputstringThe text to send to the model. Equal to
inputwhen nothing was masked.input_char_countintegerLength of the received
input, so you can confirm nothing was cut.min 0
transformed_input_completebooleanTrue when
transformed_inputcovers the wholeinput.transformed_attachmentsarray<object>›Show item attributes
filenamestringrequiredtransformed_textstringrequiredmime_typestringsourcestringOne of:
inline_text,base64_fileextraction_errorstring | nullrequires_ocrbooleanocr_usedboolean
Additional properties are accepted.
client_deanonymization_enabledbooleanWhether this allowed response permits restoring placeholders for the end user.
client_substitute_stylestringAlways
tokens(typed placeholders).Value:
tokensclient_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_msintegermin 0
shadow_modebooleanTrue when the system runs in Shadow Mode; nothing is blocked or masked.
simulated_decisionstringIn Shadow Mode, what Active Guard would have done.
One of:
allowed,masked,blockedshadow_blockedbooleanpolicy_pack_matcher_backendstringOne of:
rust_wasm,js_hybrid,legacy_fallbackpolicy_pack_scan_profilestringOne of:
expected_languages,auto_detected,global_high_priority,core_en_fallbackpolicy_pack_scan_modestringOne of:
full,segmentedexotic_language_detectedbooleanlangid_primarystringlangid_confidencestringOne of:
high,medium,lowlangid_secondaryarray<string>langid_mixedbooleanlangid_sourcestringOne of:
input_detection,input_detection_with_hintguard_metadataobjectDiagnostic summary of the decision. Its fields may change.
transparencyobjectPresent when transparency metadata injection is enabled for the system.
›Show child attributes
is_ai_generatedbooleanValue:
truedisclosurestringarticlestringinjection_modestring
Additional properties are accepted.
{
"allowed": false,
"reason": "payload_too_large"
}429Rate limit or quota exceeded.
Headers
Retry-AfterintegerSeconds to wait before retrying.
min 1
X-RateLimit-LimitintegerMaximum requests allowed in the current window.
X-RateLimit-RemainingintegerRequests remaining in the current window.
›Response schemaGuardResponse
allowedbooleanrequiredWhether you may call the model.
reasonstringWhy 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 asPolicy violation: Term blocked by admin.detected_piibooleanWhether personal data or secrets were detected in the input or attachments.
checkedbooleanbypassedbooleanTrue when the check was skipped because of a dependency failure in a fail-open system.
transformed_inputstringThe text to send to the model. Equal to
inputwhen nothing was masked.input_char_countintegerLength of the received
input, so you can confirm nothing was cut.min 0
transformed_input_completebooleanTrue when
transformed_inputcovers the wholeinput.transformed_attachmentsarray<object>›Show item attributes
filenamestringrequiredtransformed_textstringrequiredmime_typestringsourcestringOne of:
inline_text,base64_fileextraction_errorstring | nullrequires_ocrbooleanocr_usedboolean
Additional properties are accepted.
client_deanonymization_enabledbooleanWhether this allowed response permits restoring placeholders for the end user.
client_substitute_stylestringAlways
tokens(typed placeholders).Value:
tokensclient_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_msintegermin 0
shadow_modebooleanTrue when the system runs in Shadow Mode; nothing is blocked or masked.
simulated_decisionstringIn Shadow Mode, what Active Guard would have done.
One of:
allowed,masked,blockedshadow_blockedbooleanpolicy_pack_matcher_backendstringOne of:
rust_wasm,js_hybrid,legacy_fallbackpolicy_pack_scan_profilestringOne of:
expected_languages,auto_detected,global_high_priority,core_en_fallbackpolicy_pack_scan_modestringOne of:
full,segmentedexotic_language_detectedbooleanlangid_primarystringlangid_confidencestringOne of:
high,medium,lowlangid_secondaryarray<string>langid_mixedbooleanlangid_sourcestringOne of:
input_detection,input_detection_with_hintguard_metadataobjectDiagnostic summary of the decision. Its fields may change.
transparencyobjectPresent when transparency metadata injection is enabled for the system.
›Show child attributes
is_ai_generatedbooleanValue:
truedisclosurestringarticlestringinjection_modestring
Additional properties are accepted.
{
"allowed": false,
"reason": "rate_limited"
}{
"allowed": false,
"reason": "daily_token_limit"
}500Internal processing failure.
›Response schemaGuardResponse
allowedbooleanrequiredWhether you may call the model.
reasonstringWhy 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 asPolicy violation: Term blocked by admin.detected_piibooleanWhether personal data or secrets were detected in the input or attachments.
checkedbooleanbypassedbooleanTrue when the check was skipped because of a dependency failure in a fail-open system.
transformed_inputstringThe text to send to the model. Equal to
inputwhen nothing was masked.input_char_countintegerLength of the received
input, so you can confirm nothing was cut.min 0
transformed_input_completebooleanTrue when
transformed_inputcovers the wholeinput.transformed_attachmentsarray<object>›Show item attributes
filenamestringrequiredtransformed_textstringrequiredmime_typestringsourcestringOne of:
inline_text,base64_fileextraction_errorstring | nullrequires_ocrbooleanocr_usedboolean
Additional properties are accepted.
client_deanonymization_enabledbooleanWhether this allowed response permits restoring placeholders for the end user.
client_substitute_stylestringAlways
tokens(typed placeholders).Value:
tokensclient_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_msintegermin 0
shadow_modebooleanTrue when the system runs in Shadow Mode; nothing is blocked or masked.
simulated_decisionstringIn Shadow Mode, what Active Guard would have done.
One of:
allowed,masked,blockedshadow_blockedbooleanpolicy_pack_matcher_backendstringOne of:
rust_wasm,js_hybrid,legacy_fallbackpolicy_pack_scan_profilestringOne of:
expected_languages,auto_detected,global_high_priority,core_en_fallbackpolicy_pack_scan_modestringOne of:
full,segmentedexotic_language_detectedbooleanlangid_primarystringlangid_confidencestringOne of:
high,medium,lowlangid_secondaryarray<string>langid_mixedbooleanlangid_sourcestringOne of:
input_detection,input_detection_with_hintguard_metadataobjectDiagnostic summary of the decision. Its fields may change.
transparencyobjectPresent when transparency metadata injection is enabled for the system.
›Show child attributes
is_ai_generatedbooleanValue:
truedisclosurestringarticlestringinjection_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
allowedbooleanrequiredWhether you may call the model.
reasonstringWhy 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 asPolicy violation: Term blocked by admin.detected_piibooleanWhether personal data or secrets were detected in the input or attachments.
checkedbooleanbypassedbooleanTrue when the check was skipped because of a dependency failure in a fail-open system.
transformed_inputstringThe text to send to the model. Equal to
inputwhen nothing was masked.input_char_countintegerLength of the received
input, so you can confirm nothing was cut.min 0
transformed_input_completebooleanTrue when
transformed_inputcovers the wholeinput.transformed_attachmentsarray<object>›Show item attributes
filenamestringrequiredtransformed_textstringrequiredmime_typestringsourcestringOne of:
inline_text,base64_fileextraction_errorstring | nullrequires_ocrbooleanocr_usedboolean
Additional properties are accepted.
client_deanonymization_enabledbooleanWhether this allowed response permits restoring placeholders for the end user.
client_substitute_stylestringAlways
tokens(typed placeholders).Value:
tokensclient_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_msintegermin 0
shadow_modebooleanTrue when the system runs in Shadow Mode; nothing is blocked or masked.
simulated_decisionstringIn Shadow Mode, what Active Guard would have done.
One of:
allowed,masked,blockedshadow_blockedbooleanpolicy_pack_matcher_backendstringOne of:
rust_wasm,js_hybrid,legacy_fallbackpolicy_pack_scan_profilestringOne of:
expected_languages,auto_detected,global_high_priority,core_en_fallbackpolicy_pack_scan_modestringOne of:
full,segmentedexotic_language_detectedbooleanlangid_primarystringlangid_confidencestringOne of:
high,medium,lowlangid_secondaryarray<string>langid_mixedbooleanlangid_sourcestringOne of:
input_detection,input_detection_with_hintguard_metadataobjectDiagnostic summary of the decision. Its fields may change.
transparencyobjectPresent when transparency metadata injection is enabled for the system.
›Show child attributes
is_ai_generatedbooleanValue:
truedisclosurestringarticlestringinjection_modestring
Additional properties are accepted.
{
"allowed": false,
"reason": "system_failure"
}{
"allowed": false,
"reason": "circuit_breaker"
}