# deepl/deepl-dotnet architecture

> Architecture diagram of the GitHub repository deepl/deepl-dotnet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/deepl/deepl-dotnet
- Repository: https://github.com/deepl/deepl-dotnet

## Overview

DeepL .NET is a client SDK for sending text and documents to DeepL’s language AI API and managing related translation resources. An application creates a DeepLClient and invokes inherited translation operations or resource-management methods; the library builds HTTP requests, communicates with DeepL, and returns typed results. The README also documents rephrasing and configuration options, while the tree identifies style rules and translation-memory workflows. Source excerpts are partial, so links for unsampled capabilities show documented or declared responsibilities without inferring internal call sequences.

Main entry points: [`DeepL/Internal/DeepLHttpClient.cs`](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Internal/DeepLHttpClient.cs) (HTTP transport), [`DeepL/DeepLClient.cs`](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/DeepLClient.cs) (DeepL client), [`DeepL/Translator.cs`](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Translator.cs) (Text translation), [`DeepL/TextTranslateOptions.cs`](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/TextTranslateOptions.cs) (Request options)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Client API"]
  node_client["DeepL client<br/>[DeepLClient.cs]"]
  node_translator["Translator<br/>[Translator.cs]"]
  node_options["Request options"]
end

subgraph group_translation["Translation features"]
  node_text["Text translation<br/>[Translator.cs]"]
  node_documents["Document translation<br/>[Translator.cs]"]
  node_rephrase["Text rephrasing<br/>[Translator.cs]"]
  node_language["Language listing<br/>[Translator.cs]"]
  node_usage["Usage reporting<br/>[Translator.cs]"]
end

subgraph group_resources["Translation resources"]
  node_glossaries["Glossary management<br/>[DeepLClient.cs]"]
  node_styles["Style rules<br/>[DeepLClient.cs]"]
  node_memory["Translation memory<br/>[DeepLClient.cs]"]
end

subgraph group_transport["HTTP and models"]
  node_results["Typed results<br/>[TextResult.cs]"]
  node_http["HTTP transport<br/>[DeepLHttpClient.cs]"]
  node_json["JSON utilities<br/>[JsonUtils.cs]"]
end

node_application(("Application"))
node_deepl["DeepL API"]
node_files["TMX files"]

node_application -->|"creates and calls"| node_client
node_client -->|"inherits API"| node_translator
node_application -->|"requests translation"| node_text
node_application -->|"requests translation"| node_documents
node_application -->|"requests rephrasing"| node_rephrase
node_application -->|"lists languages"| node_language
node_application -->|"requests usage"| node_usage
node_application -->|"manages glossaries"| node_glossaries
node_application -->|"manages styles"| node_styles
node_application -->|"manages memory"| node_memory
node_text -->|"accepts options"| node_options
node_documents -->|"accepts options"| node_options
node_translator -->|"sends API requests"| node_http
node_client -->|"sends resource requests"| node_http
node_http -->|"exchanges HTTP"| node_deepl
node_http -->|"deserializes responses"| node_json
node_text -->|"returns results"| node_results
node_documents -->|"returns status"| node_results
node_memory -->|"imports or exports"| node_files

click node_client "https://github.com/deepl/deepl-dotnet/blob/main/DeepL/DeepLClient.cs"
click node_translator "https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Translator.cs"
click node_text "https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Translator.cs"
click node_documents "https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Translator.cs"
click node_rephrase "https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Translator.cs"
click node_language "https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Translator.cs"
click node_usage "https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Translator.cs"
click node_glossaries "https://github.com/deepl/deepl-dotnet/blob/main/DeepL/DeepLClient.cs"
click node_styles "https://github.com/deepl/deepl-dotnet/blob/main/DeepL/DeepLClient.cs"
click node_memory "https://github.com/deepl/deepl-dotnet/blob/main/DeepL/DeepLClient.cs"
click node_options "https://github.com/deepl/deepl-dotnet/blob/main/DeepL/TextTranslateOptions.cs"
click node_results "https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Model/TextResult.cs"
click node_http "https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Internal/DeepLHttpClient.cs"
click node_json "https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Internal/JsonUtils.cs"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_client,node_translator,node_options toneBlue
class node_text,node_documents,node_rephrase,node_language,node_usage toneAmber
class node_glossaries,node_styles,node_memory,node_deepl toneMint
class node_results,node_http,node_json toneRose
class node_application,node_files toneIndigo
```

## Components

### Client API

- [DeepL client](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/DeepLClient.cs): `DeepL/DeepLClient.cs`
- [Translator](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Translator.cs): `DeepL/Translator.cs`
- [Request options](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/TextTranslateOptions.cs): `DeepL/TextTranslateOptions.cs`

### Translation features

- [Text translation](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Translator.cs): `DeepL/Translator.cs`
- [Document translation](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Translator.cs): `DeepL/Translator.cs`
- [Text rephrasing](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Translator.cs): `DeepL/Translator.cs`
- [Language listing](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Translator.cs): `DeepL/Translator.cs`
- [Usage reporting](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Translator.cs): `DeepL/Translator.cs`

### Translation resources

- [Glossary management](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/DeepLClient.cs): `DeepL/DeepLClient.cs`
- [Style rules](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/DeepLClient.cs): `DeepL/DeepLClient.cs`
- [Translation memory](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/DeepLClient.cs): `DeepL/DeepLClient.cs`

### HTTP and models

- [Typed results](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Model/TextResult.cs): `DeepL/Model/TextResult.cs`
- [HTTP transport](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Internal/DeepLHttpClient.cs): `DeepL/Internal/DeepLHttpClient.cs`
- [JSON utilities](https://github.com/deepl/deepl-dotnet/blob/main/DeepL/Internal/JsonUtils.cs): `DeepL/Internal/JsonUtils.cs`

### Other components

- **Application**
- **DeepL API**
- **TMX files**

## Connections

- Application → DeepL client: creates and calls
- DeepL client → Translator: inherits API
- Application → Text translation: requests translation
- Application → Document translation: requests translation
- Application → Text rephrasing: requests rephrasing
- Application → Language listing: lists languages
- Application → Usage reporting: requests usage
- Application → Glossary management: manages glossaries
- Application → Style rules: manages styles
- Application → Translation memory: manages memory
- Text translation → Request options: accepts options
- Document translation → Request options: accepts options
- Translator → HTTP transport: sends API requests
- DeepL client → HTTP transport: sends resource requests
- HTTP transport → DeepL API: exchanges HTTP
- HTTP transport → JSON utilities: deserializes responses
- Text translation → Typed results: returns results
- Document translation → Typed results: returns status
- Translation memory → TMX files: imports or exports
