API Usage
GoTranslate provides a comprehensive REST API for integrating translation capabilities into your applications.
Authentication
All API requests require authentication using your API key:
Authorization: Bearer your_api_key_here
Base URL
https://culturaltranslate.com/api
Common Endpoints
Translate Text
POST /api/translate
{
"text": "Hello, World!",
"source_language": "en",
"target_language": "ar"
}
Get Projects
GET /api/projects
Create Translation Key
POST /api/projects/{project_id}/keys
{
"key": "welcome.message",
"text": "Welcome to our platform",
"context": "Homepage greeting"
}
Batch Translation
POST /api/translate/batch
{
"texts": ["Hello", "Goodbye", "Thank you"],
"source_language": "en",
"target_language": "ar"
}
Response Format
All API responses follow this structure:
{
"success": true,
"data": {
// Response data here
},
"message": "Operation successful"
}
Error Handling
Errors return appropriate HTTP status codes:
400- Bad Request (validation errors)401- Unauthorized (invalid API key)429- Too Many Requests (rate limit exceeded)500- Server Error
Rate Limits
API rate limits vary by plan:
- Free: 100 requests/hour
- Pro: 1,000 requests/hour
- Enterprise: Custom limits
SDKs
We provide official SDKs for popular languages:
Full API Reference
For complete API documentation, visit our interactive API reference.