translate
Translate text between languages with automatic detection, context-aware adjustments, and optional glossaries. Supports multiple languages and style preferences.
Instructions
Translate text between languages using Lara Translate. Supports language detection, context-aware translations, translation memories, and glossaries. The optional 'instructions' parameter accepts short localization directives (e.g., 'Translate formally') — only provide them when the content specifically requires tone, formality, or terminology adjustments.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | An array of text blocks to translate. Each block contains a text string and a boolean indicating whether it should be translated. This allows for selective translation where some text blocks can be preserved in their original form while others are translated. | |
| source | No | The source language code (e.g., 'en-EN' for English). If not specified, the system will attempt to detect it automatically. If you have a hint about the source language, you should specify it in the source_hint field. | |
| target | Yes | The target language code (e.g., 'it-IT' for Italian). This specifies the language you want the text translated into. | |
| context | No | Additional context string to improve translation quality (e.g., 'This is a legal document' or 'Im talking with a doctor'). This helps the translation system better understand the domain. | |
| instructions | No | Optional list of short localization directives to adjust translation output. Each instruction MUST be no more than 20 words. These are NOT free-form LLM prompts — they are expert localization directives about formality, tone, or domain-specific terminology. Only provide instructions when the content specifically requires them; omitting instructions for general content preserves higher translation quality. Do NOT combine contradictory instructions (e.g., formal and informal tone together). Examples: 'Translate formally', 'Use a creative and concise tone', 'Make translation gender-neutral', 'Mask any price with the [price] placeholder', 'Use quotation marks (« ») for quotations'. | |
| source_hint | No | Used to guide language detection. Specify this when the source language is uncertain to improve detection accuracy. | |
| adapt_to | No | A list of translation memory IDs for adapting the translation. | |
| glossaries | No | Array of glossary IDs to apply during translation (max 10). IDs must match format: gls_* (e.g., ['gls_xyz123', 'gls_abc456']). Glossaries enforce specific terminology and terms. | |
| no_trace | No | Privacy flag. If set to true, the request content will not be stored or traced by Lara. Use for sensitive content. | |
| priority | No | Translation priority. 'normal' for real-time translations, 'background' for batch processing with lower priority. | |
| timeout_in_millis | No | Custom timeout for the translation request in milliseconds. Max: 300000ms (5 minutes). Useful for very long texts. | |
| style | No | Controls how the translation balances accuracy against natural readability. 'faithful' stays close to the source, 'fluid' prioritizes natural readability, 'creative' allows more freedom in the translation. | |
| reasoning | No | Enables Lara Think multi-step linguistic analysis. Can increase processing time up to 10x but may improve translation quality for complex texts. | |
| content_type | No | Specifies the content type of the text. Autodetected if omitted. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| items | Yes | Translated text blocks, in the same order and structure as the input. Blocks marked translatable: false are preserved verbatim. |