summary.injection_attack is the overall verdict — 1 when either attack type
was detected, 0 when neither was. This is unchanged, so existing
integrations keep working exactly as before.
Which attack types fired is reported in details.injection_attack:
detected_attacks is non-empty exactly when summary.injection_attack is 1,
so you can keep branching on the summary and read detected_attacks only when
you need to know which type it was.
All probabilities are strings fixed to 6 decimal places.
detected_attacks is populated on the text detect paths (including scan-url
and scan-pdf, which extract text first). The image and audio endpoints
report only the 0/1 summary verdict, because the multimodal model has no
per-axis output.Explanations
Setneed_explanation: true to also get a one-sentence explanation of a
confirmed attack in details.injection_attack. It costs an extra LLM call, never
changes the verdict, and is "" when nothing was detected.
It defaults to false for this detector — note that policy_violation
defaults it to true, so the two behave differently when you omit the field.
On credit-metered accounts enabling it doubles this detector’s cost; see
Credits and Usage.
Example request:
Example response:
JSON

