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-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

The 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-key

Example 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-key

Then 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:

HeaderDescription
X-RateLimit-LimitMaximum requests per minute
X-RateLimit-RemainingRequests remaining in current window
X-RateLimit-ResetUnix timestamp when the limit resets