View as Markdown

Integrate · Concept

Rate limits

Rate limits are per-minute caps on how many requests one caller can make to each group of endpoints, which keep a shared API responsive. Every response says how much of the current limit is left, and a request over it gets a 429 that says when to retry.

When to use it

  • Pace a batch job so it doesn't hit 429.
  • Handle a 429 with the right wait instead of guessing.
  • Understand why a keyless endpoint, such as the free verify endpoint, is throttled by IP.

How it works

  1. Each request is counted in a 60-second window, for the endpoint group it belongs to.
  2. It's counted against the caller: the API key, the signed-in console session, or the client IP when there's no credential. The embed render endpoints count against the embed token, or against the publishable key and the client IP together when the token isn't one Provenance issued for that key's account. A publishable key is public, so someone who copies it from your page uses up only their own share, not your visitors'. A publishable key Provenance doesn't recognize, or one that's revoked, counts against the client IP.
  3. Over the limit, the API answers 429 rate_limit_exceeded with a Retry-After header, and doesn't run the request.
EndpointsRequests per minute
POST /v1/attest/verifications500
POST /v1/attest/attestations and capture sessions200
Embed render endpoints, POST /v1/trace/readings120
Most other endpoints100
The public trace registry and trace shares60
POST /v1/trace/chat/completions, /v1/public/*, trace disclosure30
POST /v1/attest/claims/{id}/escalate20

POST /v1/attest/media/screen also has an hourly cap per IP, because each screening calls a paid external detector. Sign-in links have a separate limit per email address.

Headers

Every response, including successful ones, carries the current window. Check them on any request:

export PROVENANCE_API=https://sandbox-api.provenanceauth.com
export PROVENANCE_KEY=prv_test_full_K7mN3xQp9RbT2vWm8sYd4cFjLhXn6gAe

curl -s -o /dev/null -D - $PROVENANCE_API/v1/attest/claims \
  -H "Authorization: Bearer $PROVENANCE_KEY" | grep -i ratelimit
x-ratelimit-limit: 100
x-ratelimit-remaining: 99
x-ratelimit-reset: 1792856810
X-RateLimit-Limitinteger
The limit for this endpoint group.
X-RateLimit-Remaininginteger
Requests left in the current window.
X-RateLimit-Resetinteger
When the oldest counted request leaves the window, as a Unix time.
Retry-Afterinteger
On a 429 only: seconds to wait before retrying.

Back off on a 429

Wait for Retry-After seconds, then retry with exponential backoff and a little random jitter. Better still, slow down when X-RateLimit-Remaining gets low. The Node and Python SDKs retry 429 and 5xx responses for you, honoring Retry-After, up to three times.