target_lang must be the same language (improving and translating in one request is not yet supported).
Prerequisites
- A DeepL API Pro subscription. Write is not yet available on API Free plans, and its use is covered by these additions to the Service Specification.
- Your API key from your account settings. The same keys work for all DeepL API endpoints, Write included.
curl, or one of the official client libraries, which support all Write features.
Building with an AI coding agent?
Wire it up to the DeepL Docs MCP Server so it can search and read this documentation while it writes code. In Claude Code:Step 1: Rephrase a text
The/v2/write/rephrase endpoint is Write’s broad improvement mode: it fixes spelling and grammar, and may also rewrite sentences for clarity, style, or tone.
Sample request
Sample response
text parameter is an array, so you can improve multiple texts in one request; improvements come back in the same order. The total request body is limited to 10 KiB, so split larger workloads across multiple calls.
target_lang currently supports de, en-GB, en-US, es, fr, it, ja, ko, pt-BR, pt-PT, and zh/zh-Hans. To check programmatically, call GET /v3/languages?resource=write.
Step 2: Fix errors only, keeping the author’s voice
When you want corrections without rewrites, use the/v2/write/correct endpoint instead. It fixes spelling and grammar with minimal changes to wording, matching the “Corrections Only” mode in the DeepL Translator UI.
Sample request
Sample response
/write/correct fixed the errors but kept the original phrasing (“edits on this text”), while /write/rephrase also reworded the sentence.
Step 3: Change the writing style
On/write/rephrase, the writing_style parameter steers how the text is rewritten:
Sample request
Sample response
tone parameter adjusts how the text sounds (friendly, confident, diplomatic, and more). A request can include writing_style or tone, but not both. For all available values, per-language support, and the prefer_ fallback behavior, see Controlling Writing Style and Tone.
Next steps
You’ve now used both Write endpoints and steered the output style. To keep going:- Explore all style and tone options in Controlling Writing Style and Tone
- See the full request and response schemas in the
/write/rephraseand/write/correctreferences - Rephrase between language variants with the language variants guide
- Note that Write characters count toward the same usage quota and cost control limits as translation characters