API Reference
Integration-ready endpoints for high-performance Namibian language translation. Built for speed, scale, and accuracy.
01.Authentication
Our API supports two methods of authentication. Use API Keys for server-to-server communication and Bearer tokens for client-side user sessions.
API Key (Recommended)
Use the X-API-Key header to authenticate requests from your backend services.
Bearer Token
Use the standard Authorization header for authenticated user portal calls.
02.The "UI Mirroring" Pattern
Stop flattening your data. Our API respects your UI tree.
Unlike legacy translation APIs that require you to send flat arrays of strings, translate processes entire nested objects. The engine recursively traverses your payload, translates every { "og": "..." } node, and returns the exact same structure back.
03.Quick Start
Integration with any stack is trivial. Choose your language and start translating.
const response = await fetch('https://api.translate.nkngo.com/translate', {
method: 'POST',
headers: {
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
requestType: 'web_app',
project: 'my_project',
targetLanguages: ['hz', 'af'],
payload: {
header: {
title: { og: 'Professional Translation Engine' }
}
}
})
});
const data = await response.json();
console.log(data.payload.header.title.hz); // Wa lalapo...04.Errors & Limits
Standard HTTP response codes for clear debugging.
| Code | Message | Description |
|---|---|---|
| 400 | Bad Request | Malformed JSON or missing "payload" key. |
| 401 | Unauthorized | Invalid API Key or expired Bearer token. |
| 429 | Limit Reached | Your current API plan quota has been exceeded. |
| 500 | Server Error | Translation engine cold-start or GPU timeout. |