Getting Started
The TranslateHub API is organized around REST. Our API has predictable resource-oriented URLs,
accepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes.
Base URL
https://api.translatehub.tech/v1
SDKs Available
Authentication
The TranslateHub API uses API keys to authenticate requests. You can view and manage your API keys
in the Dashboard. Include your API key in the Authorization header of all requests.
Example Request
curl https://api.translatehub.tech/v1/projects \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"
⚠️ Security Warning: Keep your API keys secure. Do not share them in publicly accessible areas
such as GitHub, client-side code, etc.
Projects
Projects are the top-level organizational unit in TranslateHub. Each project can contain multiple
documents and maintains its own terminology database and settings.
POST
Create a Project
POST /v1/projects
{
"name": "Mobile App Localization",
"source_language": "en",
"target_languages": ["es", "fr", "de", "zh"],
"terminology_db_id": "term_abc123",
"style_guide_id": "style_xyz789"
}
Response
{
"id": "proj_abc123",
"name": "Mobile App Localization",
"source_language": "en",
"target_languages": ["es", "fr", "de", "zh"],
"status": "active",
"created_at": "2026-01-04T10:00:00Z",
"updated_at": "2026-01-04T10:00:00Z"
}
GET
List Projects
GET /v1/projects?limit=10&offset=0
GET
Retrieve a Project
GET /v1/projects/:project_id
Documents
POST
Upload Document
POST /v1/projects/:project_id/documents
{
"file": "base64_encoded_content",
"filename": "user_manual.docx",
"format": "docx",
"target_languages": ["es", "fr"]
}
Response
{
"id": "doc_abc123",
"project_id": "proj_abc123",
"filename": "user_manual.docx",
"format": "docx",
"word_count": 5420,
"status": "processing",
"segments": 342,
"created_at": "2026-01-04T10:05:00Z"
}
GET
Get Document Status
GET /v1/documents/:document_id
Translations
POST
Start Translation
POST /v1/documents/:document_id/translate
{
"target_language": "es",
"mode": "neural_mt",
"apply_terminology": true,
"apply_style_guide": true,
"segment_alignment": true
}
Translation Modes
neural_mt - Neural machine translation
hybrid - MT + translation memory
human - Human translation workflow
GET
Get Translation Progress
GET /v1/translations/:translation_id
Response:
{
"id": "trans_abc123",
"document_id": "doc_abc123",
"target_language": "es",
"status": "in_progress",
"progress": 67,
"segments_completed": 229,
"segments_total": 342,
"estimated_completion": "2026-01-04T11:30:00Z"
}
Terminology Management
POST
Add Term
POST /v1/terminology/:db_id/terms
{
"source_term": "API",
"source_language": "en",
"translations": {
"es": "API",
"fr": "API",
"de": "API"
},
"definition": "Application Programming Interface",
"context": "technical documentation",
"case_sensitive": true,
"locked": true
}
GET
Search Terms
GET /v1/terminology/:db_id/terms?query=API&language=en
Review Workflow
POST
Submit for Review
POST /v1/translations/:translation_id/reviews
{
"stage": "linguistic_review",
"assignee_id": "user_abc123",
"due_date": "2026-01-06T17:00:00Z"
}
PUT
Update Review Status
PUT /v1/reviews/:review_id
{
"status": "approved",
"comments": "Quality looks good, minor fixes applied",
"quality_score": 95
}
Webhooks
Webhooks allow you to receive real-time notifications about events in your account.
Available Events
translation.completed
review.submitted
review.approved
document.uploaded
Example Payload
{
"event": "translation.completed",
"timestamp": "2026-01-04T12:00:00Z",
"data": {
"translation_id": "trans_abc123",
"document_id": "doc_abc123",
"target_language": "es",
"word_count": 5420,
"quality_score": 94
}
}
Error Handling
TranslateHub uses conventional HTTP response codes to indicate the success or failure of an API request.
200 - OK
Everything worked as expected.
400 - Bad Request
The request was unacceptable, often due to missing parameters.
401 - Unauthorized
No valid API key provided.
429 - Too Many Requests
Rate limit exceeded.
500 - Server Error
Something went wrong on our end.
Error Response Format
{
"error": {
"code": "invalid_request",
"message": "Missing required parameter: target_language",
"param": "target_language",
"type": "invalid_request_error"
}
}
Rate Limits
API rate limits vary by plan. Check response headers for current limit status.
Starter Plan
1,000
requests per day
Professional Plan
10,000
requests per day
Rate Limit Headers
X-RateLimit-Limit: 10000
X-RateLimit-Remaining: 9543
X-RateLimit-Reset: 1704384000