Authentication
The DeepL SDK uses API key authentication. DeepL uses a custom DeepL-Auth-Key authorization scheme instead of standard Bearer. The SDK handles this automatically -- you pass the API key and a PrepareRequest hook converts the Authorization: Bearer <key> header to Authorization: DeepL-Auth-Key <key>.
You can obtain an API key from your DeepL account.
Basic Usage
1 2 3 | |
Free vs Pro API
DeepL offers both Free and Pro API plans. The Free API uses a different base URL (https://api-free.deepl.com). If you are using a Free API key (ending in :fx), configure the base URL:
1 2 3 | |
Environment Variable
| Variable | Description |
|---|---|
DEEPL_API_KEY |
Your DeepL API key |