Authentication
Quota uses API keys to authenticate requests. You can create and manage your API keys from the dashboard.
API Key Format
Quota API keys follow this format:
sk-quota-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxThe sk-quota- prefix helps identify Quota keys and prevents accidental use with other services.
Using Your API Key
Include your API key in the Authorization header:
Authorization: Bearer sk-quota-your-api-keyExample with cURL
curl https://api.usequota.app/v1/balance \
-H "Authorization: Bearer sk-quota-your-api-key"Example with JavaScript
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.usequota.app/v1",
apiKey: "sk-quota-your-api-key",
});Environment Variables
We recommend storing your API key in an environment variable:
# .env
QUOTA_API_KEY=sk-quota-your-api-keyThen use it in your code:
const client = new OpenAI({
baseURL: "https://api.usequota.app/v1",
apiKey: process.env.QUOTA_API_KEY,
});Security Best Practices
- Never commit API keys to version control
- Use environment variables in production
- Rotate keys periodically
- Use separate keys for development and production
Rate Limits
API requests are rate limited to 100 requests per minute by default. Rate limit headers are included in every response:
| Header | Description |
|---|---|
X-RateLimit-Limit | Maximum requests per minute |
X-RateLimit-Remaining | Requests remaining in current window |
X-RateLimit-Reset | Unix timestamp when the limit resets |