Getting Started

Rate Limits & Errors

Retry the right failures, never retry the wrong ones, and use requestId to trace any result.

HTTP 429 includes retry-after404 = endpoint price / 429, 5xx = 0
auth: x-api-keycontent-type: application/jsonenvelope: data + meta
request.sh
curl -i -s "https://api.cleanfetch.dev/v1/x/profile?username=openai" \
  -H "x-api-key: cf_live_your_key_here"
response.json
200 OK / application/json
{
  "error": {
    "code": "rate_limited",
    "message": "Workspace rate limit exceeded",
    "retryAfter": 12
  },
  "meta": {
    "requestId": "req_cf_01j9k9c33cc",
    "creditsCharged": 0
  }
}

Limits by workspace

Every user gets 3 requests per minute and at most 2 requests in flight. The gateway also allows 60 requests per minute per instance. These are best-effort per-instance limits, so retry a 429 after Retry-After rather than assuming a global quota. Cache hits are served before the limiter.

Retry policy

Retry 429 after retry-after seconds. Retry 502, 503 and 504 with exponential backoff and jitter. Do not retry 400, 401, 403 or 404 without changing the request, because those answers will not change.

Error envelope

Errors use error.code, error.message and, where useful, error.retryAfter. Common codes are insufficient_credits and free_tier_exhausted (HTTP 402), plan_required (403) and rate_limited (429). Free accounts can call public endpoints up to their daily cap; LinkedIn email and batch are paid-only. meta.requestId is present on every response, including failures, so support can trace the exact upstream call.

Idempotency

Lookups are read-only, so retrying a request is safe. Add your own request key around writes in your application. CleanFetch does not create platform content.

ready