Authentication
All API requests require authentication using your API key.
Getting Your API Key
- Sign in to your reGOTCHA account
- Navigate to Console → API Keys
- Click Create API Key
- Give your key a descriptive name (e.g., "Production", "Development")
- Copy and securely store your API key
Security: Never expose your API key in client-side code or public repositories. Use environment variables to store your key securely.
Using Your API Key
Include your API key in the request body as clientKey:
{
"clientKey": "YOUR_API_KEY",
"task": {
// task details
}
}Multiple API Keys
You can create multiple API keys for different purposes:
- Development - For local testing
- Staging - For pre-production testing
- Production - For live applications
Each key shares your account's credit balance but tracks usage separately, making it easy to monitor usage per environment.
Revoking Keys
If you suspect a key has been compromised:
- Go to Console → API Keys
- Find the compromised key
- Click the Delete button
- Create a new key and update your applications
Rate Limits
API requests are rate-limited to ensure fair usage:
- createTask: 100 requests/minute
- getTaskResult: 300 requests/minute
- getBalance: 60 requests/minute
If you exceed these limits, you'll receive a 429 Too Many Requests response. Wait a moment before retrying.