API reference
Check
Screen a prompt against a policy and get a decision back.
Screen a prompt against a policy
/v1/checkRuns every enabled check of the policy in one call to the screening engine, applies the code-side floors and the policy, logs the decision, and (unless dry-run) opens a review item and queues webhooks. latency_ms is received → decided; Server-Timing breaks it down.
Parameters
idempotency-keystringheaderRetries with the same key (per tenant) return the first decision instead of screening again.
x-vindex-dry-runstringheadertrue: evaluate and log, but open no review item and send no webhooks.
Body
inputobjectrequiredinput.promptstringrequired1–10000 chars
input.negative_promptstring≤ 5000 chars
input.contextstring[]Surrounding text (earlier chat turns, a title). Stored with the decision; not screened yet. ≤ 20 items
policystringPolicy id. Defaults to the tenant's default policy. 1–64 chars
userstringYour id for the end user this prompt is from. Stored with the decision; rules count, tag and pause per user. A paused user's checks are blocked. 1–128 chars
policy_versionintegerScreen against this version of the policy, published or not, instead of its current one. Dry-run only (
X-Vindex-Dry-Run: true): for comparing versions. ≥ 1metadataobjectYour own JSON (at most 4096 bytes), stored with the decision and returned by GET /v1/decisions/:id.
Request
curl -X POST "https://api.getvindex.com/v1/check" \
-H "Authorization: Bearer $VINDEX_KEY" \
-H "Content-Type: application/json" \
-d '{"input":{"prompt":"a lighthouse at dusk, oil painting"}}'Response 200
The decision. Idempotent-Replayed: true when returned for a repeated Idempotency-Key.
{
"id": "dec_3f2a0c9e8b7d4c6a9f1e2d3c4b5a6978",
"outcome": "allow",
"tags": [],
"checks": {
"minors_sexual": {
"score": 0.01,
"review_score": 0.01,
"fired": []
},
"adult": {
"score": 0.01,
"review_score": 0.01,
"fired": []
},
"real_person": {
"score": 0.01,
"review_score": 0.01,
"fired": []
},
"copyrighted_ip": {
"score": 0.01,
"review_score": 0.01,
"fired": []
}
},
"policy": {
"id": "pol_3f2a0c9e8b7d4c6a9f1e2d3c4b5a6978",
"version": 1
},
"engine_version": "2026.09",
"latency_ms": 412,
"dry_run": false,
"mode": "test",
"shadow_mode": false
}Errors
400Invalid request (malformed JSON, or the body/query failed validation).401Missing, malformed, unknown or revoked API key.402Nothing was screened.subscription_paused: a payment has been failing for 14 days.subscription_inactive: the plan has ended (read-only).plan_required: a live key on a workspace with no plan, or a test key past the free allowance.404policynames no policy of this tenant (policy_not_found).422Nopolicyand no default policy (no_default_policy), or an Idempotency-Key reused with a different body (idempotency_key_reused).429Rate limit exceeded for this API key. SeeRetry-After.503The screening engine is unavailable (screening_unavailable); nothing was decided. SeeRetry-After.