Legacy TinyLimiter documentation. About this product
TinyLimiter uses API keys for authentication. Each key is scoped to a single product and mode.
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_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6
ts_limiter_live_x9y8z7w6v5u4t3s2r1q0p9o8n7m6l5k4
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 |
:::tip Start with a test key during development. Switch to live when you're ready for production. :::
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
Both formats are accepted:
Authorization: Bearer ts_limiter_test_xxx
Authorization: ts_limiter_test_xxx
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 file
TINYSCALE_API_KEY=ts_limiter_live_xxx
# Access in code
const apiKey = process.env.TINYSCALE_API_KEY;
Managing Keys
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
- Go to dashboard.tinyscale.io/keys
- Find the key you want to revoke
- Click the revoke button
- Confirm revocation
:::caution
Revoking a key is immediate and cannot be undone. Any requests using the revoked key will receive a 401 Unauthorized error.
:::
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.