API Reference
Integration-ready endpoints for NKNGO translation models. Otjiherero text translation is active now; Loid3 is NKNGO's upcoming voice-and-text model for more languages.
01.Authentication
The production JSON translation 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 straightforward. Use the active Otjiherero target today; additional voice-and-text languages will be exposed through Loid3 when ready.
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: ['otjiherero'],
payload: {
header: {
title: { og: 'Professional Translation Engine' }
}
}
})
});
const data = await response.json();
console.log(data.payload.header.title.otjiherero);04.Model Status
The current public test model is NLLB Otjiherero-English v1. Oshiwambo, Damara/Nama, Rumanyo, Rukwangali, Ndonga, Kwanyama, Silozi, and Setswana are planned for Loid3, NKNGO's upcoming voice-and-text model.
Otjiherero text translation
Served through NKNGO's dedicated translation API infrastructure.
Text and audio generation
Loid3 is being trained in the NKNGO Labs pipeline and is not production-ready yet.
05.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 | Unexpected service error during translation processing. |