API Keys
API keys are required to authenticate requests to GPT Translator APIs.
On This Page
- Before You Start
- Create an API Key
- Use Your API Key
- Key Management
- Security Best Practices
- Next Steps
Before You Start
Ensure you have:
- A GPT Translator account.
- Access to the API dashboard.
- A server-side environment for secure key storage.
Create an API Key
- Sign in to your GPT Translator account.
- Open Developer API Keys in the dashboard.
- Click Generate New API Key.
- Copy the generated key immediately.
- 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 invalidx-api-key.403 Forbidden: key exists but access is not allowed.429 Too Many Requests: request rate exceeded.
Next Steps
- Continue to Text Translation API
- Reference Supported Languages