Authentication

All API requests require authentication using your API key.

Getting Your API Key

  1. Sign in to your reGOTCHA account
  2. Navigate to Console → API Keys
  3. Click Create API Key
  4. Give your key a descriptive name (e.g., "Production", "Development")
  5. 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:

  1. Go to Console → API Keys
  2. Find the compromised key
  3. Click the Delete button
  4. 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.