Skip to content

Authentication

All /v1/* routes require:

Authorization: Bearer qp-your-api-key
Content-Type: application/json

How Validation Works

The Worker validates the bearer key against the configured authentication backend (Supabase):

api_keys?key=eq.<key>&is_active=eq.true

The selected fields are:

id, key, name, email, tier, requests_count

If the key is valid, the Worker asynchronously updates:

requests_count
last_used_at

Invalid or Missing Key

{
  "error": {
    "message": "Invalid or missing API key.",
    "type": "auth_error",
    "code": "invalid_api_key"
  }
}

Pro Model Access

A permission check still exists for pro-only Puter model ids. Because all chat calls are routed and NVIDIA is first, this mainly matters when the effective selected/fallback model matches the pro-only rules:

{
  "error": {
    "message": "Model 'gpt-5.5' is a Pro tier model, please upgrade.",
    "type": "permission_error",
    "code": "model_access_denied",
    "required_tier": "pro",
    "model": "gpt-5.5"
  }
}