| title | Style rules |
|---|---|
| sidebarTitle | Overview |
| description | Manage a shared list of rules for style, formatting, and more |
The style rules feature allows you to select a set of rules to apply when translating text. These rules make changes to your text according to the selected formatting and spelling conventions.
You can create style rules in the UI at https://deepl.com/custom-rules.
Both style rules and glossaries are unique to each of DeepL's global data centers and are not shared between them. Clients using the api-us.deepl.com endpoint will not be able to access glossaries or style rules created in the UI at this time.
Get all style rules lists and their meta-information.
curl -X GET 'https://api.deepl.com/v3/style_rules' \
--header 'Authorization: DeepL-Auth-Key [yourAuthKey]' {
"style_rules": [
{
"style_id": "a74d88fb-ed2a-4943-a664-a4512398b994",
"name": "Technical Documentation Rules",
"creation_time": "2024-10-01T12:34:56Z",
"updated_time": "2024-10-03T12:34:56Z",
"language": "EN",
"version": 8
}
]
}You can also optionally pass in a detailed query parameter, to retrieve all configured rules and custom instructions per rule list.
curl -X GET 'https://api.deepl.com/v3/style_rules?detailed=true' \
--header 'Authorization: DeepL-Auth-Key [yourAuthKey]' {
"style_rules": [
{
"style_id": "a74d88fb-ed2a-4943-a664-a4512398b994",
"name": "Technical Documentation Rules",
"creation_time": "2024-10-01T12:34:56Z",
"updated_time": "2024-10-03T12:34:56Z",
"language": "EN",
"version": 8,
"configured_rules": {
"numbers": {
"time_format": "always-use-24-hour-clock"
},
"style_and_tone": {
"instructions_style": "use-imperative",
"redundant_introductory_words": "avoid-redundant-introductory-words-that-relate-to-current-text"
}
},
"custom_instructions": {
"label": "My Custom instruction",
"prompt": "Use a friendly, diplomatic tone"
}
}
]
}GET https://api.deepl.com/v3/style_rules HTTP/2
Host: api.deepl.com
Authorization: DeepL-Auth-Key [yourAuthKey]
User-Agent: YourApp/1.2.3{
"style_rules": [
{
"style_id": "a74d88fb-ed2a-4943-a664-a4512398b994",
"name": "Technical Documentation Rules",
"creation_time": "2024-10-01T12:34:56Z",
"updated_time": "2024-10-03T12:34:56Z",
"language": "EN",
"version": 8
}
]
}You can also optionally pass in a detailed query parameter, to retrieve all configured rules and custom instructions per rule list.
GET https://api.deepl.com/v3/style_rules?detailed=true HTTP/2
Host: api.deepl.com
Authorization: DeepL-Auth-Key [yourAuthKey]
User-Agent: YourApp/1.2.3{
"style_rules": [
{
"style_id": "a74d88fb-ed2a-4943-a664-a4512398b994",
"name": "Technical Documentation Rules",
"creation_time": "2024-10-01T12:34:56Z",
"updated_time": "2024-10-03T12:34:56Z",
"language": "EN",
"version": 8,
"configured_rules": {
"numbers": {
"time_format": "always-use-24-hour-clock"
},
"style_and_tone": {
"instructions_style": "use-imperative",
"redundant_introductory_words": "avoid-redundant-introductory-words-that-relate-to-current-text"
}
},
"custom_instructions": {
"label": "My Custom instruction",
"prompt": "Use a friendly, diplomatic tone"
}
}
]
}To maximize the impact of Style Rules, consider the following specific applications:
-
Corporate Brand Alignment: Ensure translations match your company's unique "voice."
- Example: A lifestyle brand might use a rule to avoid "formal" terms and prefer "vibrant, youth-oriented" synonyms.
-
Technical Support Automation: Maintain consistency in documentation.
- Example: Set
instructions_styletouse-imperativeto ensure all troubleshooting steps (e.g., "Press the button") are clear and direct.
- Example: Set
-
Global E-commerce Compliance: Handle regional nuances in numbers and formats.
- Example: Use
numbers.time_formatset toalways-use-24-hour-clockfor logistics apps operating in Europe.
- Example: Use
-
Inclusive Communication: Adapt content for diverse audiences.
- Example: Apply custom instructions to "ensure gender-neutral pronouns are used wherever possible" to align with modern HR policies.
-
Legal and Contractual Precision: Preserve the exact meaning of sensitive terms.
- Example: Use custom prompts to "maintain the specific legal distinction between 'shall' and 'may' in contractual clauses."