i18n
This capability is granted by an API key scoped to the `` product (product face). See the product reference below.
Multi-provider translation + UI-string i18n capability. Machine translation over a provider fallback chain (LibreTranslate | LLM | Bhashini | Stub) with H2 breaker/retry/timeout; language detection (langdetect + Unicode heuristic); a UI-string dictionary registry with a 3-level fallback chain (locale -> 'en' -> raw key); RTL/locale metadata; and entity-content translation (generalizes translate-article). Every endpoint carries organization_id (I6 product-tier tenant); MT output is org-namespaced so tenants never share a cached translation.
- Group: Governance & platform
- Contract:
contracts/i18n/v1/openapi.yaml - Public base:
https://api.vagarylabs.com(the consolidated API gateway — one host, per-brand siblingapi.<zone>) - Auth: a product API key (
vgk_…) issued from the console —Authorization: Bearer vgk_… - Product face (customer-keyed):
https://api.vagarylabs.com/product/v1/i18n/translate
Endpoints
| Method | Path | Summary |
|---|---|---|
GET | /health | liveness + provider readiness (open, tailnet-scoped) |
GET | /metrics | Prometheus text exposition (open, tailnet-scoped) |
POST | /v1/i18n/translate | machine-translate text over the provider fallback chain (cached, org-namespaced) |
POST | /v1/i18n/translate/batch | machine-translate a batch of texts (cap 100), same source/target |
GET | /v1/i18n/languages | languages supported for machine translation (live from provider, else static union) |
POST | /v1/i18n/detect | detect the language of a text (langdetect + Unicode heuristic fallback) |
GET | /v1/i18n/locales | available UI-string locales + supported-language display metadata (RTL/flag/name) |
GET | /v1/i18n/locales/{locale} | the merged UI-string bundle for a locale (locale dict over the 'en' fallback dict) |
POST | /v1/i18n/translate-entity | translate a product ENTITY's named text fields, cached by (org, entity_type, entity_ref, target). Generalizes platform's translate-article. The product SUPPLIES the fields (I1/I4 — core never fetches from a product DB); on a cache HIT the fields may be omitted. |
Schemas
Error
| Field | Type | Description |
|---|---|---|
error | string | stable machine code (slug), e.g. validation_error, unauthorized, payload_too_large |
reason | string | human-readable one-line explanation (no secrets/PII) |
detail | object | |
request_id | string |
Generated by scripts/gen-capability-docs.py from contracts/i18n/v1/openapi.yaml — the contract IS the source of truth; edit the contract, not this page.