Skip to main content

API Keys

API keys are required to authenticate requests to GPT Translator APIs.

On This Page

Before You Start

Ensure you have:

  1. A GPT Translator account.
  2. Access to the API dashboard.
  3. A server-side environment for secure key storage.

Create an API Key

  1. Sign in to your GPT Translator account.
  2. Open Developer API Keys in the dashboard.
  3. Click Generate New API Key.
  4. Copy the generated key immediately.
  5. Store it in your backend environment variable (for example: .env).

Use Your API Key

Send your key in the request header:

x-api-key: YOUR_API_KEY

Key Management

  • Regenerate key: rotates credentials and invalidates the previous key.
  • Delete key: permanently disables API access for that key.
  • Single source of truth: keep active keys tracked in your secret manager.

Security Best Practices

Critical

Never expose API keys in frontend code, browser bundles, or public repositories.

  • Keep keys only on the server side.
  • Use environment variables or a secrets manager.
  • Rotate keys on schedule or after any suspected leak.
  • Restrict operational access to key management actions.
  • Monitor API usage regularly for unusual traffic.

Common Errors

  • 401 Unauthorized: missing or invalid x-api-key.
  • 403 Forbidden: key exists but access is not allowed.
  • 429 Too Many Requests: request rate exceeded.

Next Steps