VindexDocs

Concepts

Rate limits & errors

Every error from the API has the same shape, application/problem+json (RFC 7807), with a stable code to switch on. title and detail are for people and may change; code won't.

400 invalid_request
{
  "type": "https://api.getvindex.com/problems/invalid_request",
  "title": "Invalid request",
  "status": 400,
  "detail": "The request json failed validation.",
  "code": "invalid_request",
  "issues": [
    "input.prompt: Invalid input: expected string, received undefined"
  ]
}
  • type: a URL for the code.
  • status: the HTTP status, repeated.
  • issues: on validation errors, one line per problem found.

Codes

StatuscodeWhat happenedWhat to do
400invalid_requestThe body, query or a header failed validationFix the request; issues says where
400policy_version_requires_dry_runpolicy_version without the dry-run headerAdd X-Vindex-Dry-Run: true (Dry-run)
401unauthorizedKey missing, malformed, unknown or revokedCheck Authorization: Bearer vx_…
402plan_requiredNot on this plan: a live key without a plan, or one more policy, rule or reviewer seat than the plan hasChange plans at upgrade_url (Plans & limits)
402subscription_pausedA payment has been failing for 14 days, so checks are pausedUpdate the card (When a payment fails)
402subscription_inactiveThe plan has ended, so the workspace is read-onlyChoose a plan at upgrade_url
403test_key_forbiddenA test key tried something only a live key canUse a live key (API keys)
403reveal_forbiddenreveal from someone who isn't an owner or adminAsk an owner or admin
403mode_forbiddenA mode filter for the other mode: a key reads its own mode's data onlyUse a key of that mode (API keys)
404not_foundNo such decision, review item, policy or key in this workspaceCheck the id
404policy_not_foundpolicy or policy_version names nothingCheck the id and version
409already_decidedThe review item already has a verdictNothing: it's decided
409cannot_revoke_current_keyA key tried to revoke itselfRevoke it with another key
413payload_too_largeThe body is over 256 KiBSend less
415unsupported_media_typeThe body isn't sent as JSONSend Content-Type: application/json
422invalid_policyA policy document broke a ruleFix what issues lists (Policies)
422unknown_presetNo preset by that nameGET /v1/presets
422no_default_policyNo policy given, and the workspace has noneCreate one with POST /v1/policies
422idempotency_key_reusedSame Idempotency-Key, different bodyUse a new key (Idempotency)
429rate_limitedOver the per-key rate limitWait Retry-After seconds
500internal_errorSomething broke on our sideRetry with the same Idempotency-Key
503screening_unavailableThe screening engine couldn't be reached; nothing was decidedWait Retry-After seconds and retry

An unknown path is a plain 404 without a code. Dashboard-only codes (role_forbidden and the like) never reach an API key.

Rate limits

Each key gets its plan's requests a minute, over a sliding window: 600 on Starter, 1,200 on Growth, 3,000 on Scale, and 60 for a workspace with no plan yet (Plans & limits). Every /v1 response carries:

HeaderMeaning
X-RateLimit-LimitRequests allowed per minute
X-RateLimit-RemainingRequests left in the window
X-RateLimit-ResetSeconds until the window is clear

Over the limit, the API answers 429 rate_limited with Retry-After in seconds. Need more than your plan's? Email hello@getvindex.com.

When screening is unavailable

If the screening engine can't be reached, POST /v1/check returns 503 screening_unavailable with Retry-After. Nothing was decided and nothing was logged. Vindex never answers allow because it couldn't check.

What your app does meanwhile is your call. Most hold the generation and retry. With the same Idempotency-Key, a retry can never log the decision twice. Idempotency has a retry loop in Node and Python.

Limits on a check

FieldLimit
input.prompt1 to 10,000 characters
input.negative_prompt5,000 characters
input.context20 items, 5,000 characters each
metadata4,096 bytes of JSON
user128 characters
Idempotency-Key1 to 255 printable ASCII characters
Whole body256 KiB