Base URL
Authentication
The CompareBench API uses session cookies for authentication. There is no API key or Bearer token flow for end-user requests — authentication is handled via Auth0 and exchanged for a server-side Flask session.Login flow
- The client authenticates with Auth0 (domain:
auth.comparebench.com, client ID:FlPRwtekp1NM7W1UwvsH4r5M5z0TUKSv). - The raw Auth0 ID token is sent to the backend:
- The backend validates the token and responds with a
Set-Cookieheader. Extract thename=valuepair and send it as aCookieheader on all subsequent authenticated requests.
Rate limiting
Only unauthenticated, non-GET requests are rate limited. Authenticated requests and all GET requests are exempt.HTTP status codes
| Code | Meaning |
|---|---|
200 | Success |
400 | Bad request / validation error |
401 | Not authenticated |
402 | Feature requires a paid tier |
403 | Forbidden — also triggers session logout |
429 | Rate limit exceeded |
Request conventions
- Most endpoints accept and return JSON. The exception is
POST /benchmarks/add, which usesmultipart/form-data. - List endpoints accept a
POSTbody and return{ results: [], total: number }. - CORS is allowed from
comparebench.com,admin.comparebench.com, andlocalhost:4200/4201.
Billing tiers
Some endpoints enforce per-feature limits based on the authenticated user’s billing tier.| Tier | Type |
|---|---|
free | Default |
enthusiast | One-time purchase |
professional | Subscription |
402 response indicates the requested action requires a higher tier.