Authentication
TinyLimiter uses API keys for authentication. Each key is scoped to a single product and mode.
API Key Format
Section titled “API Key Format”ts_limiter_{mode}_{32_random_characters}| Segment | Description |
|---|---|
ts | TinyScale prefix |
limiter | Product identifier |
live or test | Mode |
| 32 chars | Random identifier |
Examples:
ts_limiter_test_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6ts_limiter_live_x9y8z7w6v5u4t3s2r1q0p9o8n7m6l5k4Test vs Live Mode
Section titled “Test vs Live Mode”| Test Mode | Live Mode | |
|---|---|---|
| Prefix | ts_limiter_test_ | ts_limiter_live_ |
| Rate limits | 50 req/min | 1,000 req/min |
| Monthly usage | 1,000 requests | 100K free, then metered |
| Billing | Not counted | Counted toward usage |
| Use case | Development, CI/CD | Production |
Making Authenticated Requests
Section titled “Making Authenticated Requests”Include your API key in the Authorization header:
curl -X POST https://limiter.tinyscale.io/v1/check \ -H "Authorization: Bearer ts_limiter_test_xxx" \ -H "Content-Type: application/json" \ -d '{"namespace": "api", "identifier": "user_1", "limit": 10, "window": 60000}'Header Formats
Section titled “Header Formats”Both formats are accepted:
Authorization: Bearer ts_limiter_test_xxxAuthorization: ts_limiter_test_xxxKey Security
Section titled “Key Security”- Never commit keys to version control - Use environment variables
- Keys are shown once - Store them securely after creation
- Rotate compromised keys - Create a new key, migrate, then revoke the old one
- Use test keys for CI/CD - Avoid consuming production quota
# .env fileTINYSCALE_API_KEY=ts_limiter_live_xxx
# Access in codeconst apiKey = process.env.TINYSCALE_API_KEY;Managing Keys
Section titled “Managing Keys”Create a Key
Section titled “Create a Key”- Go to dashboard.tinyscale.io/keys
- Click Create Key
- Select product (TinyLimiter) and mode (test/live)
- Name your key (e.g., “Production API”, “CI/CD Testing”)
- Copy and store the key securely
Revoke a Key
Section titled “Revoke a Key”- Go to dashboard.tinyscale.io/keys
- Find the key you want to revoke
- Click the revoke button
- Confirm revocation
Subscription Requirements
Section titled “Subscription Requirements”| Key Mode | Subscription Required? |
|---|---|
| Test | No |
| Live | Yes (free tier available) |
Live mode keys require an active subscription. If your subscription lapses, live keys will return 402 Payment Required until you resubscribe.
Test mode keys always work, regardless of subscription status.