Learn how to create effective custom instructions to customize your translation behavior
The custom_instructions parameter allows you to provide natural language instructions that customize how the DeepL API translates text. This guide provides best practices for creating effective custom instructions that produce consistent, high-quality results.
Custom instructions are applied while the text is translated, sentence by sentence and passage by passage. They are not applied as an editing pass over the finished document. This makes them effective for local changes, such as word choice, tone, and the structure of individual sentences, and unreliable for changes that depend on seeing the whole text at once.An instruction that describes the shape of the entire text, such as reordering an argument, converting lists into running text, or adding a summary, is applied to each passage individually. Instead of restructuring the document once, it restructures every passage, which typically lowers translation quality.
Write instructions that apply to the structure of one or more sentences, not to the structure of the entire text.
❌ INCORRECT: Whole-text restructuring — “Structure the text as a continuous chain: observation, problem framing, definition, implications”✅ CORRECT: Sentence-level structure — “Split sentences longer than 25 words into two shorter sentences”If you need the translated document restructured, translate it with local instructions only, then restructure the result in a separate step.
Custom instructions should be written in either English or the target language. This ensures the translation engine can properly interpret and apply your instructions.English instruction (works for all target languages) — “Use informal language appropriate for a mobile app”Target language instruction (French) — “Utiliser un langage informel adapté à une application mobile”
State what the translation should do, rather than what it should not do. Positive formulations are clearer and more effective.❌ INCORRECT: Negative formulation — “Don’t use overly formal language or avoid casual expressions”✅ CORRECT: Positive formulation — “Use a conversational, friendly tone”
Each custom instruction should contain a single, focused directive. This makes your instructions clearer and more predictable.❌ INCORRECT: Multiple instructions combined — “Use technical terminology, maintain formal tone, and convert measurements to metric”✅ CORRECT: Separate instructions
“Use technical terminology appropriate for engineers”
4. Provide details on when and how to apply the rule
Include context about when the rule should be applied and specific guidance on how to apply it.❌ INCORRECT: Vague instruction — “Handle gender appropriately”✅ CORRECT: Specific instruction with context — “When translating role titles, use gender-neutral forms where available in the target language”Elements of a detailed instruction:
Keep conditions simple and focused. Complex conditional logic reduces effectiveness.❌ INCORRECT: Too many conditions — “If the text contains product names or brand terms, unless they appear in headings or quotes, and the context is marketing material rather than technical documentation, then capitalize all words except articles”✅ CORRECT: Simplified conditions
“Capitalize product names and brand terms in marketing content”
“Preserve original capitalization in technical documentation”
6. Write instructions as translation directives, not chatbot prompts
Custom instructions guide translation behavior. They should be concise directives, not conversational prompts.❌ INCORRECT: Chatbot-style prompt — “Please translate this text in a way that would be appropriate for a luxury fashion brand. Make sure to sound elegant and sophisticated, like you’re speaking to a high-end clientele.”✅ CORRECT: Clear translation directive — “Use elegant, sophisticated language appropriate for luxury fashion”
All active instructions apply to every translation together; there is no priority order among them. However, the broader and more transformative an instruction is, the more strongly it shapes the output. A single instruction that rewrites heavily can drown out the effect of your more specific instructions.To keep a set of instructions predictable:
Add instructions one at a time, and test each against representative source texts before adding the next
Keep each instruction local and specific, following the best practices above
If translation quality drops after a change, remove the broadest instruction first and retest
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"DeepL Documentation","description":"Developer documentation for the DeepL API: translate text and documents, transcribe and translate speech in real time, improve text, and customize output with glossaries, style rules, and translation memories.","colors":{"primary":"#0f2b46","light":"#ffffff","dark":"#0f2b46"},"logo":{"light":"https://mintcdn.com/deepl-c950b784/QiF37QSCmRj62dXZ/_assets/logo/light_with_text.svg?fit=max\u0026auto=format\u0026n=QiF37QSCmRj62dXZ\u0026q=85\u0026s=2dfc0d736effb479c0ac145abe2ab2c3","dark":"https://mintcdn.com/deepl-c950b784/QiF37QSCmRj62dXZ/_assets/logo/dark_with_text.svg?fit=max\u0026auto=format\u0026n=QiF37QSCmRj62dXZ\u0026q=85\u0026s=1c796b7a29370a15d010c5f6cda342f3"},"favicon":"https://mintcdn.com/deepl-c950b784/QiF37QSCmRj62dXZ/_assets/favicon.svg?fit=max\u0026auto=format\u0026n=QiF37QSCmRj62dXZ\u0026q=85\u0026s=b46ca099e325b1b5f0ce2f0fc351e394","api":{"openapi":"api-reference/openapi.yaml","asyncapi":"api-reference/voice/voice.asyncapi.yaml","playground":{"proxy":false},"examples":{"defaults":"required","languages":["curl"]}},"appearance":{"default":"light","strict":false},"background":{"color":{"light":"#ffffff"}},"navbar":{"links":[{"href":"https://www.deepl.com/en/pro#api","label":"Pricing"}],"primary":{"type":"button","label":"Free API Key","href":"https://www.deepl.com/en/checkout?is_api=true"}},"footer":{"socials":{"facebook":"https://www.facebook.com/DeepLcom","linkedin":"https://www.linkedin.com/company/deepl","github":"https://github.com/DeepL","instagram":"https://www.instagram.com/deeplhq"},"links":[{"items":[{"label":"API Status","href":"https://status.deepl.com/?tab=api"},{"label":"DeepL Status","href":"https://status.deepl.com"},{"label":"Contact","href":"/docs/resources/contact"}]}]},"seo":{"metatags":{"google-site-verification":"0VDGg3gJk53xL5burIUykHtV_eBhXTp5AMdzaeffbbU"},"organization":{"id":"https://www.deepl.com/","name":"DeepL","legalName":"DeepL SE","url":"https://www.deepl.com","logo":"https://static.deepl.com/img/logo/deepl-logo-blue.svg","sameAs":["https://github.com/DeepL","https://www.linkedin.com/company/deepl","https://x.com/DeepLcom","https://www.instagram.com/deeplhq/","https://www.youtube.com/@DeepLcom"]},"indexing":"navigable"},"fonts":{"heading":{"family":"Roboto"},"body":{"family":"Roboto"}},"integrations":{"cookies":{"key":"deepl_cookie_consent","value":"accepted"}},"banner":{"content":"Help shape the DeepL API roadmap. [Take the survey](https://deepl.qualtrics.com/jfe/form/SV_8fbjoZx1wQUkAC2)","dismissible":true},"errors":{"404":{"redirect":false,"title":"Page not found","description":"This page does not exist. Humans: check out the [Quickstart](/docs/getting-started/quickstart) or the [API reference](/api-reference/translate/request-translation). Machines: try [/llms.txt](/llms.txt), [the docs MCP server](https://developers.deepl.com/mcp), or OpenAPI specs for [Text](/api-reference/openapi.yaml) and [Voice](/api-reference/voice/voice.asyncapi.yaml)."}},"contextual":{"options":["copy","download-spec","chatgpt","claude","cursor","vscode"],"display":"header"},"markdown":{"instructions":["Use the DeepL API when a task needs machine translation or text improvement, including translating text strings, whole documents with formatting preservation, or transcribing and translating live speech. Preferred terminology and phrasing may be enforced using customizations (glossaries, style rules, and translation memories). Retrieve supported languages for each product from the `/v3/languages` endpoints.","Read the machine-readable API surface instead of inferring request shapes from prose: the REST spec is at https://developers.deepl.com/api-reference/openapi.yaml (also served as openapi.json) and the Voice WebSocket protocol is at https://developers.deepl.com/api-reference/voice/voice.asyncapi.yaml. These docs also expose an MCP server at https://developers.deepl.com/mcp (Streamable HTTP, no authentication).","Use https://api.deepl.com for Pro plans and https://api-free.deepl.com for the Free plan. Authenticate every request with the header `Authorization: DeepL-Auth-Key \u003capi-key>`. Never fabricate an API key: ask the user for one, or point them at https://developers.deepl.com/docs/getting-started/quickstart.","Errors use standard HTTP status codes with a JSON body containing a `message` field, plus a `code` field where available, and an `X-Trace-ID` response header that identifies the request in DeepL's logs. Log `X-Trace-ID` by default. Retry 429 and 5xx with exponential backoff. Do not retry 456, which means the account quota is exhausted, or 400, which means the request itself is invalid."]},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"deepl-c950b784","hasAudioNarration":false,"actualSubdomain":"deepl-c950b784","customDomains":["developers.deepl.com"],"gitSource":{"type":"github","owner":"deepl","repo":"api-docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"REMOVE_BRANDING":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aeb5069245c712a705ad947","clientVersion":"0.0.4094","searchFilterCounts":[{"language":"default","tag":"API Reference","count":66},{"language":"default","tag":"Customize","count":55},{"language":"default","tag":"Home","count":35},{"language":"default","tag":"Translate","count":23},{"language":"default","tag":"Glossaries","count":17},{"language":"default","tag":"Admin","count":14},{"language":"default","tag":"Style Rules","count":12},{"language":"default","tag":"Spoken Terms","count":10},{"language":"default","tag":"Text Translation","count":10},{"language":"default","tag":"Voice","count":9}]},"assistantConfig":{},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"cookie-banner.css","content":"#cookie-banner{position:fixed;bottom:0;left:0;width:100%;background:#0f2b46;color:#fff;padding:20px;display:flex;justify-content:space-between;align-items:center;gap:20px;z-index:10000;box-shadow:0 -2px 10px rgba(0, 0, 0, 0.2);font-family:Roboto, sans-serif}#cookie-banner-content{flex:1}#cookie-banner-text{margin:0;font-size:14px;line-height:1.5}#cookie-banner-text a{color:#4FC3F7;text-decoration:underline}#cookie-banner-buttons{display:flex;gap:12px;flex-shrink:0}#cookie-reject,#cookie-accept{padding:10px 20px;border-radius:4px;cursor:pointer;font-size:14px;font-weight:500;transition:all 0.2s;font-family:Roboto, sans-serif}#cookie-reject{background:transparent;color:#fff;border:1px solid #fff}#cookie-reject:hover{background:rgba(255, 255, 255, 0.1)}#cookie-accept{background:#fff;color:#0f2b46;border:none}#cookie-accept:hover{background:#e6e6e6}@media (max-width: 768px){#cookie-banner{flex-direction:column;align-items:stretch;gap:16px;padding:16px}#cookie-banner-buttons{width:100%;justify-content:stretch}#cookie-reject,#cookie-accept{flex:1}}"},{"filePath":"user-study-popup.css","content":"#user-study-popup{position:fixed;right:24px;bottom:24px;z-index:9999;pointer-events:none;font-family:Roboto, sans-serif}#user-study-card{position:relative;width:360px;max-width:calc(100vw - 48px);padding:24px;background:#ffffff;border:1px solid rgba(15, 43, 70, 0.12);border-radius:16px;box-shadow:0 20px 45px rgba(15, 43, 70, 0.16), 0 6px 16px rgba(15, 43, 70, 0.1);pointer-events:auto;transform:translateX(calc(100% + 48px));transition:transform 0.35s ease}#user-study-card.slide-in{transform:translateX(0)}#user-study-card.slide-out{transform:translateX(calc(100% + 48px));transition:transform 0.25s ease-in}#user-study-close{position:absolute;top:12px;right:12px;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:0;border-radius:999px;background:transparent;color:#6b7280;font-size:24px;line-height:1;cursor:pointer}#user-study-close:hover{background:rgba(15, 43, 70, 0.06);color:#0f2b46}#user-study-eyebrow{margin:0 0 8px;color:#0f2b46;font-size:12px;font-weight:700;letter-spacing:0.08em;text-transform:uppercase}#user-study-content h3{margin:0 28px 12px 0;color:#111827;font-size:22px;font-weight:700;line-height:1.2}#user-study-content p{margin:0 0 18px;color:#4b5563;font-size:14px;line-height:1.5}#user-study-cta{display:inline-flex;align-items:center;justify-content:center;width:100%;min-height:44px;border-radius:999px;background:#0f2b46;color:#ffffff;font-size:14px;font-weight:600;text-decoration:none}#user-study-cta:hover{background:#133858}@media (max-width: 480px){#user-study-popup{right:16px;bottom:16px;left:16px}#user-study-card{width:auto;max-width:none;padding:20px}#user-study-content h3{font-size:20px}}"},{"filePath":"navbar-cta.css","content":"html.dark #topbar-cta-button a>span:first-child{background-color:#FFFFFF!important}html.dark #topbar-cta-button a,html.dark #topbar-cta-button a span,html.dark #topbar-cta-button a svg{color:#292929!important}"}],"page":{"pagePath":"docs/customize/custom-instructions","slug":"/docs/customize/custom-instructions","pageMetadata":{"title":"Custom instructions","description":"Learn how to create effective custom instructions to customize your translation behavior","public":true,"href":"/docs/customize/custom-instructions"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Learn how to create effective custom instructions to customize your translation behavior\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Heading,Warning}=_components;if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.code,{children:`custom_instructions`}),` parameter allows you to provide natural language instructions that customize how the DeepL API translates text. This guide provides best practices for creating effective custom instructions that produce consistent, high-quality results.`]}),`\n`,_jsx(Heading,{level:`2`,id:`what-are-custom-instructions`,children:`What are custom instructions?`}),`\n`,_jsx(_components.p,{children:`Custom instructions enable you to guide the translation engine with specific requirements for your use case. You can use custom instructions to:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Control tone and style (e.g., “Use a friendly, diplomatic tone”)`}),`\n`,_jsx(_components.li,{children:`Specify domain-specific terminology preferences`}),`\n`,_jsx(_components.li,{children:`Define formatting conventions`}),`\n`,_jsxs(_components.li,{children:[`Adjust formality levels beyond the standard `,_jsx(_components.code,{children:`formality`}),` parameter`]}),`\n`,_jsx(_components.li,{children:`Provide context-specific guidance for specialized content`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Custom instructions can also be used in conjunction with other features, such as glossaries, style rules, and the `,_jsx(_components.code,{children:`context`}),` parameter.`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-instructions-are-applied`,children:`How instructions are applied`}),`\n`,_jsx(_components.p,{children:`Custom instructions are applied while the text is translated, sentence by sentence and passage by passage. They are not applied as an editing pass over the finished document. This makes them effective for local changes, such as word choice, tone, and the structure of individual sentences, and unreliable for changes that depend on seeing the whole text at once.`}),`\n`,_jsx(_components.p,{children:`An instruction that describes the shape of the entire text, such as reordering an argument, converting lists into running text, or adding a summary, is applied to each passage individually. Instead of restructuring the document once, it restructures every passage, which typically lowers translation quality.`}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`Write instructions that apply to the structure of one or more sentences, not to the structure of the entire text.`})}),`\n`,_jsxs(_components.p,{children:[`❌ `,_jsx(_components.strong,{children:`INCORRECT: Whole-text restructuring`}),` — “Structure the text as a continuous chain: observation, problem framing, definition, implications”`]}),`\n`,_jsxs(_components.p,{children:[`✅ `,_jsx(_components.strong,{children:`CORRECT: Sentence-level structure`}),` — “Split sentences longer than 25 words into two shorter sentences”`]}),`\n`,_jsx(_components.p,{children:`If you need the translated document restructured, translate it with local instructions only, then restructure the result in a separate step.`}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Best practices`}),`\n`,_jsx(Heading,{level:`3`,id:`1-write-rules-in-english-or-the-target-language`,children:`1. Write rules in English or the target language`}),`\n`,_jsx(_components.p,{children:`Custom instructions should be written in either English or the target language. This ensures the translation engine can properly interpret and apply your instructions.`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`English instruction`}),` (works for all target languages) — “Use informal language appropriate for a mobile app”`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Target language instruction`}),` (French) — “Utiliser un langage informel adapté à une application mobile”`]}),`\n`,_jsx(Heading,{level:`3`,id:`2-formulate-rules-positively`,children:`2. Formulate rules positively`}),`\n`,_jsx(_components.p,{children:`State what the translation should do, rather than what it should not do. Positive formulations are clearer and more effective.`}),`\n`,_jsxs(_components.p,{children:[`❌ `,_jsx(_components.strong,{children:`INCORRECT: Negative formulation`}),` — “Don’t use overly formal language or avoid casual expressions”`]}),`\n`,_jsxs(_components.p,{children:[`✅ `,_jsx(_components.strong,{children:`CORRECT: Positive formulation`}),` — “Use a conversational, friendly tone”`]}),`\n`,_jsx(Heading,{level:`3`,id:`3-one-instruction-per-rule`,children:`3. One instruction per rule`}),`\n`,_jsx(_components.p,{children:`Each custom instruction should contain a single, focused directive. This makes your instructions clearer and more predictable.`}),`\n`,_jsxs(_components.p,{children:[`❌ `,_jsx(_components.strong,{children:`INCORRECT: Multiple instructions combined`}),` — “Use technical terminology, maintain formal tone, and convert measurements to metric”`]}),`\n`,_jsxs(_components.p,{children:[`✅ `,_jsx(_components.strong,{children:`CORRECT: Separate instructions`})]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`“Use technical terminology appropriate for engineers”`}),`\n`,_jsx(_components.li,{children:`“Maintain a formal, professional tone”`}),`\n`,_jsx(_components.li,{children:`“Convert imperial measurements to metric units”`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`4-provide-details-on-when-and-how-to-apply-the-rule`,children:`4. Provide details on when and how to apply the rule`}),`\n`,_jsx(_components.p,{children:`Include context about when the rule should be applied and specific guidance on how to apply it.`}),`\n`,_jsxs(_components.p,{children:[`❌ `,_jsx(_components.strong,{children:`INCORRECT: Vague instruction`}),` — “Handle gender appropriately”`]}),`\n`,_jsxs(_components.p,{children:[`✅ `,_jsx(_components.strong,{children:`CORRECT: Specific instruction with context`}),` — “When translating role titles, use gender-neutral forms where available in the target language”`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Elements of a detailed instruction:`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`When`}),`: Conditions that trigger the rule`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`What`}),`: Specific elements to modify`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`How`}),`: Desired behavior or format`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`5-avoid-too-many-conditions-per-rule`,children:`5. Avoid too many conditions per rule`}),`\n`,_jsx(_components.p,{children:`Keep conditions simple and focused. Complex conditional logic reduces effectiveness.`}),`\n`,_jsxs(_components.p,{children:[`❌ `,_jsx(_components.strong,{children:`INCORRECT: Too many conditions`}),` — “If the text contains product names or brand terms, unless they appear in headings or quotes, and the context is marketing material rather than technical documentation, then capitalize all words except articles”`]}),`\n`,_jsxs(_components.p,{children:[`✅ `,_jsx(_components.strong,{children:`CORRECT: Simplified conditions`})]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`“Capitalize product names and brand terms in marketing content”`}),`\n`,_jsx(_components.li,{children:`“Preserve original capitalization in technical documentation”`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`6-write-instructions-as-translation-directives-not-chatbot-prompts`,children:`6. Write instructions as translation directives, not chatbot prompts`}),`\n`,_jsx(_components.p,{children:`Custom instructions guide translation behavior. They should be concise directives, not conversational prompts.`}),`\n`,_jsxs(_components.p,{children:[`❌ `,_jsx(_components.strong,{children:`INCORRECT: Chatbot-style prompt`}),` — “Please translate this text in a way that would be appropriate for a luxury fashion brand. Make sure to sound elegant and sophisticated, like you’re speaking to a high-end clientele.”`]}),`\n`,_jsxs(_components.p,{children:[`✅ `,_jsx(_components.strong,{children:`CORRECT: Clear translation directive`}),` — “Use elegant, sophisticated language appropriate for luxury fashion”`]}),`\n`,_jsx(Heading,{level:`2`,id:`combining-multiple-instructions`,children:`Combining multiple instructions`}),`\n`,_jsx(_components.p,{children:`All active instructions apply to every translation together; there is no priority order among them. However, the broader and more transformative an instruction is, the more strongly it shapes the output. A single instruction that rewrites heavily can drown out the effect of your more specific instructions.`}),`\n`,_jsx(_components.p,{children:`To keep a set of instructions predictable:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Add instructions one at a time, and test each against representative source texts before adding the next`}),`\n`,_jsx(_components.li,{children:`Keep each instruction local and specific, following the best practices above`}),`\n`,_jsx(_components.li,{children:`If translation quality drops after a change, remove the broadest instruction first and retest`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`technical-constraints`,children:`Technical constraints`}),`\n`,_jsx(_components.p,{children:`When using custom instructions, keep these constraints in mind:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Maximum instructions`}),`: Up to 10 custom instructions per request`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Character limit`}),`: Each instruction can contain a maximum of 300 characters`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Supported target languages`}),`: See `,_jsx(_components.a,{href:`/docs/getting-started/supported-languages`,children:`Languages supported`})]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Model compatibility`}),`: Custom instructions are compatible with all `,_jsx(_components.code,{children:`model_type`}),` values.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`related-documentation`,children:`Related documentation`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/api-reference/translate/request-translation`,children:`Text translation API reference`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/api-reference/document/upload-and-translate-a-document`,children:`Document translation API reference`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/docs/learning-how-tos/examples-and-guides/how-to-use-context-parameter`,children:`Working with context`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/docs/customize/using-style-rules`,children:`Style rules API`})}),`\n`,_jsx(_components.li,{children:_jsx(_components.a,{href:`/docs/customize/managing-glossaries`,children:`Multilingual glossaries`})}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Custom instructions","description":"Learn how to create effective custom instructions to customize your translation behavior","public":true,"href":"/docs/customize/custom-instructions"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"What are custom instructions?","slug":"what-are-custom-instructions","depth":2,"children":[]},{"title":"How instructions are applied","slug":"how-instructions-are-applied","depth":2,"children":[]},{"title":"Best practices","slug":"best-practices","depth":2,"children":[{"title":"1. Write rules in English or the target language","slug":"1-write-rules-in-english-or-the-target-language","depth":3,"children":[]},{"title":"2. Formulate rules positively","slug":"2-formulate-rules-positively","depth":3,"children":[]},{"title":"3. One instruction per rule","slug":"3-one-instruction-per-rule","depth":3,"children":[]},{"title":"4. Provide details on when and how to apply the rule","slug":"4-provide-details-on-when-and-how-to-apply-the-rule","depth":3,"children":[]},{"title":"5. Avoid too many conditions per rule","slug":"5-avoid-too-many-conditions-per-rule","depth":3,"children":[]},{"title":"6. Write instructions as translation directives, not chatbot prompts","slug":"6-write-instructions-as-translation-directives-not-chatbot-prompts","depth":3,"children":[]}]},{"title":"Combining multiple instructions","slug":"combining-multiple-instructions","depth":2,"children":[]},{"title":"Technical constraints","slug":"technical-constraints","depth":2,"children":[]},{"title":"Related documentation","slug":"related-documentation","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/deepl-c950b784/79954643574228d7/analytics.js","/_mintlify/custom/deepl-c950b784/7c795428034ccd8b/cookie-banner.js","/_mintlify/custom/deepl-c950b784/e09568492714dd0f/user-study-popup.js","/_mintlify/custom/deepl-c950b784/06c83788a8296584/user-data.js"],"subdomain":"deepl-c950b784","siteName":"DeepL Documentation","title":"Custom instructions - DeepL Documentation","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-02T14:03:36.339Z","originalFileLocation":"docs/customize/custom-instructions.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Learn how to create effective custom instructions to customize your translation behavior\">\u003cmeta data-mint-head name=\"application-name\" content=\"DeepL Documentation\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/deepl-c950b784/hSlhr1iEcolF1mhS/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/deepl-c950b784/hSlhr1iEcolF1mhS/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/deepl-c950b784/hSlhr1iEcolF1mhS/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/deepl-c950b784/hSlhr1iEcolF1mhS/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/deepl-c950b784/hSlhr1iEcolF1mhS/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/deepl-c950b784/hSlhr1iEcolF1mhS/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/deepl-c950b784/hSlhr1iEcolF1mhS/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/deepl-c950b784/hSlhr1iEcolF1mhS/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/deepl-c950b784/hSlhr1iEcolF1mhS/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Custom instructions - DeepL Documentation\">\u003cmeta data-mint-head property=\"og:description\" content=\"Learn how to create effective custom instructions to customize your translation behavior\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"DeepL Documentation\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.deepl.com/docs/customize/custom-instructions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://deepl-c950b784.mintlify.site/_mintlify/api/og/v2?division=Style+Rules\u0026amp;title=Custom+instructions\u0026amp;description=Learn+how+to+create+effective+custom+instructions+to+customize+your+translation+behavior\u0026amp;theme=cbe3b3ecb06f10c89ca05ab6\u0026amp;signature=fc7e32970bdc0d4fdf749c8c713f92149e51790f1831779245ff8f8e7e5df8b1\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Custom instructions - DeepL Documentation\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Learn how to create effective custom instructions to customize your translation behavior\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://deepl-c950b784.mintlify.site/_mintlify/api/og/v2?division=Style+Rules\u0026amp;title=Custom+instructions\u0026amp;description=Learn+how+to+create+effective+custom+instructions+to+customize+your+translation+behavior\u0026amp;theme=cbe3b3ecb06f10c89ca05ab6\u0026amp;signature=fc7e32970bdc0d4fdf749c8c713f92149e51790f1831779245ff8f8e7e5df8b1\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/deepl-c950b784/hSlhr1iEcolF1mhS/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"DeepL Documentation\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0f2b46\">\u003cmeta data-mint-head name=\"google-site-verification\" content=\"0VDGg3gJk53xL5burIUykHtV_eBhXTp5AMdzaeffbbU\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.deepl.com/docs/customize/custom-instructions\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/customize/custom-instructions.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://www.deepl.com/\",\"name\":\"DeepL\",\"legalName\":\"DeepL SE\",\"url\":\"https://www.deepl.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://static.deepl.com/img/logo/deepl-logo-blue.svg\"},\"sameAs\":[\"https://github.com/DeepL\",\"https://www.linkedin.com/company/deepl\",\"https://x.com/DeepLcom\",\"https://www.instagram.com/deeplhq/\",\"https://www.youtube.com/@DeepLcom\"]},{\"@type\":\"WebSite\",\"@id\":\"https://developers.deepl.com#website\",\"name\":\"DeepL Documentation\",\"url\":\"https://developers.deepl.com\",\"publisher\":{\"@id\":\"https://www.deepl.com/\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.deepl.com/docs/customize/custom-instructions#webpage\",\"url\":\"https://developers.deepl.com/docs/customize/custom-instructions\",\"name\":\"Custom instructions\",\"description\":\"Learn how to create effective custom instructions to customize your translation behavior\",\"dateModified\":\"2026-11-02T14:03:36.339Z\",\"isPartOf\":{\"@id\":\"https://developers.deepl.com#website\"},\"breadcrumb\":{\"@id\":\"https://developers.deepl.com/docs/customize/custom-instructions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.deepl.com/docs/customize/custom-instructions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Style Rules\",\"item\":\"https://developers.deepl.com/docs/customize/using-style-rules\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Custom instructions\",\"item\":\"https://developers.deepl.com/docs/customize/custom-instructions\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://developers.deepl.com/docs/customize/custom-instructions#article\",\"headline\":\"Custom instructions\",\"name\":\"Custom instructions\",\"description\":\"Learn how to create effective custom instructions to customize your translation behavior\",\"url\":\"https://developers.deepl.com/docs/customize/custom-instructions\",\"mainEntityOfPage\":{\"@id\":\"https://developers.deepl.com/docs/customize/custom-instructions#webpage\"},\"dateModified\":\"2026-11-02T14:03:36.339Z\",\"publisher\":{\"@id\":\"https://www.deepl.com/\"},\"isPartOf\":{\"@id\":\"https://developers.deepl.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"DeepL Documentation\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"DeepL Documentation","nav":{"global":null,"tabs":[{"tab":"Home","icon":"house","pages":[{"title":"Home","href":"/docs/getting-started/quickstart"}]},{"tab":"Translate","icon":"language","pages":[{"title":"Translate","href":"/docs/translate/overview"}]},{"tab":"Voice","icon":"waveform-lines","pages":[{"title":"Voice","href":"/docs/voice/overview"}]},{"tab":"Customize","icon":"wand-magic-sparkles","pages":[{"title":"Customize","sidebarTitle":"Overview","href":"/docs/customize/overview"},{"title":"How to Apply Glossaries to Language Variants","href":"/docs/customize/customizations-for-variants"},{"group":"Glossaries","pages":[{"title":"Glossaries in the Real World","href":"/docs/customize/glossaries-in-the-real-world"},{"title":"Managing Glossaries","href":"/docs/customize/managing-glossaries"},{"title":"Glossary v2 vs v3 Endpoints","href":"/docs/customize/glossary-v2-vs-v3-endpoints"}]},{"group":"Style Rules","pages":[{"title":"Using Style Rules","description":"Create style rule lists with configured rules and custom instructions, and apply them to translations with the style_id parameter.","href":"/docs/customize/using-style-rules"},{"title":"Custom instructions","href":"/docs/customize/custom-instructions"}]},{"group":"Spoken Terms","pages":[{"title":"Improving Transcription with Spoken Terms","description":"Keep company names, acronyms, and product terminology transcribed correctly in Voice API sessions by creating and maintaining a Spoken Terms collection.","href":"/docs/customize/improving-transcription-with-spoken-terms"},{"title":"Spoken Terms Requirements","href":"/docs/customize/spoken-terms-requirements"}]},{"group":"Translation Memories","pages":[{"title":"Using Translation Memories","href":"/docs/customize/using-translation-memories"}]},{"group":"Style Profiles","pages":[{"title":"Using Style Profiles","href":"/docs/customize/using-style-profiles"}]}]},{"tab":"Admin","icon":"sliders","pages":[{"title":"Admin","href":"/docs/admin/overview"}]},{"tab":"API Reference","icon":"code","pages":[{"title":"API Reference","href":"/api-reference/translate/request-translation"}]}]},"basePath":"","title":"Custom instructions - DeepL Documentation","buildId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","deploymentId":"dpl_42LwxxU1kGN114H4XzwGYXa9ZDah","dynamics":["10e4515597"],"chunks":["BannerMarkdown-DV-WToSZ.js","dist-CBUH0-zX.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-CR-RHrVC.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}