API Keys
Overview
Section titled “Overview”API keys allow you to programmatically access translation services via REST API. Keys are scoped to organizations, so each organization can have its own set of API keys.
Creating an API Key
Section titled “Creating an API Key”- Navigate to API Keys from the sidebar (under Organization).
- Click Create new API Key.
- Enter a descriptive label for the key (e.g., “Production Server”, “CLI Tool”, “Test Environment”).
- Click Create.
- Important: Copy the API key immediately - it’s only shown once for security.
- Store the key securely before closing the dialog.
Security Note: API keys are only displayed once during creation. If you lose a key, you must create a new one.
Using API Keys
Section titled “Using API Keys”Authentication
Section titled “Authentication”Include your API key in the Authorization header of all API requests:
Authorization: Bearer <your-api-key>Example Request
Section titled “Example Request”curl -X POST https://api.algebras.ai/v1/translation \ -H "Authorization: Bearer your-api-key-here" \ -H "Content-Type: application/json" \ -d '{ "source_language": "en", "target_languages": ["es", "fr"], "text": "Hello, world!" }'API Endpoints
Section titled “API Endpoints”Access the full API documentation at https://docs.algebras.ai/ for:
- Available endpoints
- Request/response formats
- Rate limits
- Error codes
- Code examples
Managing API Keys
Section titled “Managing API Keys”Viewing Keys
Section titled “Viewing Keys”The API Keys page shows:
- Key label (descriptive name)
- Created date
- Created by (user who created the key)
- Partial key view (masked for security)
Revoking Keys
Section titled “Revoking Keys”- Go to API Keys.
- Find the key you want to revoke.
- Click the revoke/delete action.
- Confirm revocation.
- Immediate effect: The key stops working immediately - update your applications.
Rotating Keys
Section titled “Rotating Keys”For security, rotate keys periodically:
- Create a new API key with the same or updated label.
- Update your application(s) to use the new key.
- Test that everything works with the new key.
- Revoke the old key.
This process ensures zero downtime during key rotation.
Key Management Best Practices
Section titled “Key Management Best Practices”Organization and Labeling
Section titled “Organization and Labeling”- Use descriptive labels that indicate the key’s purpose.
- Include environment in the label (prod, staging, dev).
- Note which service or application uses each key.
Security
Section titled “Security”- Never commit keys to version control: Use environment variables or secrets managers.
- Use secrets managers: Store keys in tools like AWS Secrets Manager, HashiCorp Vault, or similar.
- Limit key distribution: Only share keys with authorized team members.
- Monitor usage: Watch for unexpected API usage that might indicate a compromised key.
- Rotate regularly: Change keys every 90 days or when team members leave.
- One key per service: Create separate keys for different applications to enable individual revocation.
Access Control
Section titled “Access Control”- API keys inherit the permissions of the organization they belong to.
- Keys created in an organization can only access that organization’s resources.
- Members with appropriate roles can create keys for their organization.
Troubleshooting
Section titled “Troubleshooting”Key Not Working
Section titled “Key Not Working”- Verify the key is copied correctly (no extra spaces or characters).
- Check that the key hasn’t been revoked.
- Ensure you’re using
Bearerauthentication in the Authorization header. - Verify the key belongs to the correct organization.
Rate Limiting
Section titled “Rate Limiting”- API keys are subject to rate limits based on your plan.
- Check your plan’s API rate limits in the documentation.
- Contact support if you need higher limits.
Integration Examples
Section titled “Integration Examples”CLI Tool
Section titled “CLI Tool”Configure your CLI tool with the API key from your account settings. The key is automatically available in the API Keys section.
Server Applications
Section titled “Server Applications”Store API keys as environment variables:
export ALGEBRAS_API_KEY=your-key-hereCI/CD Pipelines
Section titled “CI/CD Pipelines”Use your CI/CD platform’s secrets management to inject API keys during builds and deployments.