Developer Portal

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.

Method A

API Key (Recommended)

Use the X-API-Key header to authenticate requests from your backend services.

X-API-Key: YOUR_SECRET_KEY
Method B

Bearer Token

Use the standard Authorization header for authenticated user portal calls.

Authorization: Bearer <JWT_TOKEN>

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.

Recursive Engine v2.0
// Input: Send your actual UI state
{ "payload": { "dashboard": { "title": { "og": "Your Revenue" }, "stats": { "label": { "og": "Active Users" } } } } }
// Output: Receive the mirrored localization tree
{ "payload": { "dashboard": { "title": { "otjiherero": "..." }, "stats": { "label": { "otjiherero": "..." } } } } }

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.

Available now

Otjiherero text translation

Served through NKNGO's dedicated translation API infrastructure.

Voice and text model coming

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.

CodeMessageDescription
400Bad RequestMalformed JSON or missing "payload" key.
401UnauthorizedInvalid API Key or expired Bearer token.
429Limit ReachedYour current API plan quota has been exceeded.
500Server ErrorUnexpected service error during translation processing.