Skip to main content
Entri’s AI translation engine uses frontier language models — Anthropic Claude and OpenAI GPT — to generate high-quality translations with context awareness. The AI reads the key name, description, any comments left by translators, and neighboring strings to produce translations that fit the tone and terminology of your project. Every AI translation includes a confidence score from 0 to 100. High-confidence translations (typically 85+) are production-ready in most cases. Lower-confidence results should be reviewed by a human translator before approval. The AI also respects your Glossary — terms marked as “do not translate” are kept verbatim, and approved translations for glossary terms are used consistently.

Endpoints

GET    /api/projects/:projectId/ai/status
POST   /api/projects/:projectId/ai/translate
POST   /api/projects/:projectId/ai/translate/batch
POST   /api/projects/:projectId/ai/translate/batch/start
GET    /api/projects/:projectId/ai/translate/batch/stream/:jobId
POST   /api/projects/:projectId/ai/translate/batch/cancel/:jobId

Supported Model IDs

Pass one of these values as the model parameter to override the project’s default:
model valueProviderName
claude-haiku-4-5AnthropicClaude Haiku 4.5
claude-sonnet-4-6AnthropicClaude Sonnet 4.6
claude-opus-4-6AnthropicClaude Opus 4.6
gpt-4o-miniOpenAIGPT-4o mini
gpt-4oOpenAIGPT-4o
gpt-5OpenAIGPT-5
gpt-5-miniOpenAIGPT-5 mini
gpt-5.2OpenAIGPT-5.2
If model is omitted, the project’s preferredModel is used. If that is also unset, Entri falls back to claude-sonnet-4-6 (or the value of DEFAULT_AI_PROVIDER in your environment).

Check AI Status

Returns available providers and models for the organization:
curl https://api.nt3.io/api/projects/proj_6abc123def456/ai/status \
  -H "X-API-Key: entri_your_token_here"
Response:
{
  "configured": true,
  "availableProviders": ["anthropic"],
  "availableModels": [
    { "id": "claude-haiku-4-5", "displayName": "Claude Haiku 4.5", "provider": "anthropic" },
    { "id": "claude-sonnet-4-6", "displayName": "Claude Sonnet 4.6", "provider": "anthropic" },
    { "id": "claude-opus-4-6", "displayName": "Claude Opus 4.6", "provider": "anthropic" }
  ]
}

Translate a Single Key

Generates a translation for one key in one target language. Uses the project’s preferredModel unless overridden with model:
curl -X POST \
  https://api.nt3.io/api/projects/proj_6abc123def456/ai/translate \
  -H "X-API-Key: entri_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "keyId": "key_abc123",
    "sourceLanguage": "en",
    "targetLanguage": "fr",
    "sourceText": "Home",
    "keyName": "nav.home",
    "model": "claude-opus-4-6"
  }'
Request body:
FieldTypeRequiredDescription
keyIdstringID of the translation key
sourceLanguagestringSource language code (e.g. en)
targetLanguagestringTarget language code (e.g. fr)
sourceTextstringText to translate
keyNamestringKey name for context (e.g. nav.home)
keyDescriptionstringOptional description for additional context
toneInstructionstringOverride tone instruction for this request
styleInstructionstringOverride style instruction for this request
additionalContextstringAdditional context for this request
modelstringModel ID to use (overrides project default)
Response:
{
  "translation": "Accueil",
  "confidence": 94,
  "alternatives": [
    { "text": "Page d'accueil", "confidence": 71 }
  ],
  "provider": "claude-opus-4-6"
}

Batch Translate

Translates all untranslated strings for a target language:
curl -X POST \
  https://api.nt3.io/api/projects/proj_6abc123def456/ai/translate/batch \
  -H "X-API-Key: entri_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "sourceLanguage": "en",
    "targetLanguage": "fr",
    "model": "gpt-4o-mini"
  }'
Request body:
FieldTypeRequiredDescription
sourceLanguagestringSource language code
targetLanguagestringTarget language code
toneInstructionstringOverride tone instruction
styleInstructionstringOverride style instruction
additionalContextstringAdditional context
modelstringModel ID to use (overrides project default)
limitnumberMax keys to translate (default 50, max 200)
The synchronous batch endpoint returns when all keys are translated. For large projects use the streaming endpoint below.

Streaming Batch Translation

For large batches, use the SSE-based streaming workflow: 1. Start a job:
curl -X POST \
  https://api.nt3.io/api/projects/proj_6abc123def456/ai/translate/batch/start \
  -H "X-API-Key: entri_your_token_here" \
  -H "Content-Type: application/json" \
  -d '{
    "sourceLanguage": "en",
    "targetLanguage": "fr"
  }'
Response: { "jobId": "uuid", "total": 120, "skipped": 5, "totalKeys": 120, "page": 1, "hasMore": false } 2. Stream progress:
GET /api/projects/:projectId/ai/translate/batch/stream/:jobId
Accept: text/event-stream
Events: start, progress (per key), complete, cancelled 3. Cancel:
curl -X POST \
  https://api.nt3.io/api/projects/proj_6abc123def456/ai/translate/batch/cancel/uuid

Key Notes

  • AI translation is available only when at least one AI provider key is configured for your organization.
  • The model used for each translation is recorded in the provider field of the response.
  • AI-generated translations are saved with source: "ai" and status translated. They are not automatically approved — a reviewer should check them before they are promoted to approved.
  • The AI uses your organization’s Translation Memory to stay consistent with previously approved translations.
Set a preferredModel in Project Settings → General → AI Settings to pick the best model for your project’s language pair and content type, without specifying it in every API call.