|
Knowledgebase
EnterprisePlatform
PlatformAPI
React (MCP)React (Lingo Compiler)
Alpha
CLIIntegrations
GuidesChangelog

Synchronous

  • How it works
  • Localize
  • Recognize
  • ProvisionEnterprise

AsynchronousEnterprise

  • How it works
  • Queue
  • Webhooks
  • WebSocket

Provision

Max PrilutskiyMax Prilutskiy·Updated 1 day ago·9 min read

The provisioning API lets you create and configure localization engines and their components programmatically. Every resource you can set up in the dashboard is also available through these endpoints.

All endpoints on this page require the same X-API-Key authentication described on the How it works page.

Engines#

A localization engine is the core unit - it holds model configs, glossary items, brand voices, and instructions that together define how translations are produced.

Create an engine#

text
POST /engines
ParameterTypeDescription
ownerOrganizationIdstringOrganization ID (org_...)
namestringEngine display name
descriptionstring (optional)Engine description
sourceLocalesstring[] (optional)BCP-47 source locales (e.g., ["en"])
targetLocalesstring[] (optional)BCP-47 target locales (e.g., ["de", "fr", "ja"])

Default model configs

Every new engine is created with a default set of model configurations (primary + fallback) using wildcard locale pairs. You can customize these after creation via the model config endpoints.

javascript
const response = await fetch("https://api.lingo.dev/engines", {
  method: "POST",
  headers: {
    "X-API-Key": "your_api_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    ownerOrganizationId: "org_abc123",
    name: "Production Engine",
    description: "Main localization engine",
    sourceLocales: ["en"],
    targetLocales: ["de", "fr", "ja"],
  }),
});

const engine = await response.json();
// { id: "eng_xyz789", name: "Production Engine", ... }

Update an engine#

text
PUT /engines/:id
ParameterTypeDescription
namestring (optional)New engine name
descriptionstring (optional)New description
sourceLocalesstring[] (optional)New source locales
targetLocalesstring[] (optional)New target locales

Get an engine#

text
GET /engines/:id

Delete an engine#

text
DELETE /engines/:id

Cascade deletion

Deleting an engine removes all its model configs, glossary items, brand voices, and instructions.

Model Configs#

Model configs map AI provider/model pairs to locale pairs on an engine. Each config has a rank - lower rank means higher priority. When the primary model fails, the engine falls through to the next ranked model.

Create a model config#

text
POST /model-configs
ParameterTypeDescription
ownerEngineIdstringEngine ID (eng_...)
providerstringAI provider (e.g., anthropic, openai)
modelstringModel name (e.g., claude-sonnet-4-6, gpt-4.1)
sourceLocalestringBCP-47 source locale, or * for all
targetLocalestringBCP-47 target locale, or * for all
ranknumber (optional)Priority rank (0 = primary, default: 0)
javascript
const response = await fetch("https://api.lingo.dev/model-configs", {
  method: "POST",
  headers: {
    "X-API-Key": "your_api_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    ownerEngineId: "eng_xyz789",
    provider: "anthropic",
    model: "claude-sonnet-4-6",
    sourceLocale: "*",
    targetLocale: "*",
    rank: 0,
  }),
});

const config = await response.json();

Use * as the locale to create a wildcard config that applies to all locale pairs. Locale-specific configs take precedence over wildcard configs.

Update a model config#

text
PUT /model-configs/:id
ParameterTypeDescription
providerstring (optional)New provider
modelstring (optional)New model
sourceLocalestring (optional)New source locale
targetLocalestring (optional)New target locale
ranknumber (optional)New priority rank

Reorder model configs#

text
POST /model-configs/reorder
ParameterTypeDescription
idsstring[]Ordered list of model config IDs (first = rank 0)

Delete a model config#

text
DELETE /model-configs/:id

Glossary Items#

Glossary items enforce exact translations or mark terms as non-translatable. During localization, the engine performs a vector similarity search against glossary items to find matching terms.

Create a glossary item#

text
POST /glossary-items
ParameterTypeDescription
ownerEngineIdstringEngine ID (eng_...)
sourceLocalestringBCP-47 source locale
targetLocalestringBCP-47 target locale
sourceTextstringSource term
targetTextstringTarget translation
hintstring (optional)Disambiguation hint for context
typestringcustom_translation or non_translatable
javascript
// Enforce a specific translation
await fetch("https://api.lingo.dev/glossary-items", {
  method: "POST",
  headers: {
    "X-API-Key": "your_api_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    ownerEngineId: "eng_xyz789",
    sourceLocale: "en",
    targetLocale: "de",
    sourceText: "workspace",
    targetText: "Arbeitsbereich",
    hint: "UI term for a project container",
    type: "custom_translation",
  }),
});

// Mark a term as non-translatable
await fetch("https://api.lingo.dev/glossary-items", {
  method: "POST",
  headers: {
    "X-API-Key": "your_api_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    ownerEngineId: "eng_xyz789",
    sourceLocale: "en",
    targetLocale: "*",
    sourceText: "Lingo.dev",
    targetText: "Lingo.dev",
    type: "non_translatable",
  }),
});

Update a glossary item#

text
PUT /glossary-items/:id

All fields are optional - only provide the fields you want to change.

Delete a glossary item#

text
DELETE /glossary-items/:id

Brand Voices#

Brand voices define how translations should sound in a specific locale. Each brand voice is scoped to a target locale on an engine. Use * as the locale for a default brand voice that applies to all locales without a specific one.

Create a brand voice#

text
POST /brand-voices
ParameterTypeDescription
ownerEngineIdstringEngine ID (eng_...)
targetLocalestringBCP-47 target locale, or * for all
textstringBrand voice description guiding tone and style
javascript
await fetch("https://api.lingo.dev/brand-voices", {
  method: "POST",
  headers: {
    "X-API-Key": "your_api_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    ownerEngineId: "eng_xyz789",
    targetLocale: "de",
    text: "Use formal German (Sie-form). Keep sentences concise and direct. Prefer active voice. Use technical terminology consistently.",
  }),
});

Update a brand voice#

text
PUT /brand-voices/:id
ParameterTypeDescription
targetLocalestring (optional)New target locale
textstring (optional)New brand voice text

Delete a brand voice#

text
DELETE /brand-voices/:id

Instructions#

Instructions are custom prompts included in every localization request for a target locale. Unlike brand voices which guide tone, instructions provide specific rules - "always use Oxford comma", "abbreviate United States as US", etc.

Create an instruction#

text
POST /instructions
ParameterTypeDescription
ownerEngineIdstringEngine ID (eng_...)
namestringInstruction name (for display)
textstringInstruction text included in the localization prompt
targetLocalestringBCP-47 target locale, or * for all
javascript
await fetch("https://api.lingo.dev/instructions", {
  method: "POST",
  headers: {
    "X-API-Key": "your_api_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    ownerEngineId: "eng_xyz789",
    name: "Date format",
    text: "Always format dates as DD.MM.YYYY in German translations.",
    targetLocale: "de",
  }),
});

Update an instruction#

text
PUT /instructions/:id
ParameterTypeDescription
namestring (optional)New instruction name
textstring (optional)New instruction text
targetLocalestring (optional)New target locale

Delete an instruction#

text
DELETE /instructions/:id

API Keys#

API keys authenticate requests to the localization API. Each key is scoped to an organization and has access to all engines within it.

Create an API key#

text
POST /api-keys
ParameterTypeDescription
ownerOrganizationIdstringOrganization ID (org_...)
namestringKey display name

The response includes a key field with the full API key. This is the only time the key is returned - store it securely.

json
{
  "id": "key_abc123",
  "ownerOrganizationId": "org_abc123",
  "name": "Production",
  "key": "lingo_sk_..."
}

Get an API key#

text
GET /api-keys/:id

Returns metadata only (name, ID). The key value is never returned after creation.

Delete an API key#

text
DELETE /api-keys/:id

Full Provisioning Example#

This example creates a complete engine configuration from scratch:

javascript
const API = "https://api.lingo.dev";
const headers = {
  "X-API-Key": "your_api_key",
  "Content-Type": "application/json",
};

// 1. Create an engine
const engine = await fetch(`${API}/engines`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    ownerOrganizationId: "org_abc123",
    name: "Web App Engine",
    sourceLocales: ["en"],
    targetLocales: ["de", "fr", "ja"],
  }),
}).then((r) => r.json());

// 2. Add a locale-specific model for Japanese
// (the engine already has default wildcard models)
await fetch(`${API}/model-configs`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    ownerEngineId: engine.id,
    provider: "anthropic",
    model: "claude-sonnet-4-6",
    sourceLocale: "en",
    targetLocale: "ja",
    rank: 0,
  }),
});

// 3. Set brand voice for German
await fetch(`${API}/brand-voices`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    ownerEngineId: engine.id,
    targetLocale: "de",
    text: "Use formal German (Sie-form). Technical but approachable.",
  }),
});

// 4. Add a glossary term
await fetch(`${API}/glossary-items`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    ownerEngineId: engine.id,
    sourceLocale: "en",
    targetLocale: "de",
    sourceText: "workspace",
    targetText: "Arbeitsbereich",
    type: "custom_translation",
  }),
});

// 5. Add an instruction
await fetch(`${API}/instructions`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    ownerEngineId: engine.id,
    name: "Formality",
    text: "Always use formal address in all translations.",
    targetLocale: "*",
  }),
});

// Engine is ready - use it with the localize endpoint
const translation = await fetch(`${API}/process/localize`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    engineId: engine.id,
    sourceLocale: "en",
    targetLocale: "de",
    data: { greeting: "Hello, world!" },
  }),
}).then((r) => r.json());

Next Steps#

Localize
Translate key-value pairs through a configured localization engine
Recognize
Detect the language of arbitrary text
Engines
Learn about localization engine configuration in the dashboard
API Keys
Generate and manage API keys in the dashboard

Was this page helpful?