Body
Required
-
Text to be improved. Only UTF-8-encoded plain text is supported. Improvements are returned in the same order as they are requested.
-
The language for the text improvement. Options currently available:
de- Germanen- English (unspecified variant, defaults toen-US)en-GB- English (British)en-US- English (American)es- Spanishfr- Frenchit- Italianpt- Portuguese (unspecified variant, defaults topt-PT)pt-BR- Portuguese (Brazilian)pt-PT- Portuguese (all Portuguese variants excluding Brazilian Portuguese)
Values are
de,en,en-GB,en-US,fr,it,pt,pt-BR, orpt-PT. -
Specify a style to rephrase your text in a way that fits your audience and goals. The
prefer_prefix allows falling back to the default style if the language does not yet support styles.Values are
academic,business,casual,default,simple,prefer_academic,prefer_business,prefer_casual, orprefer_simple. -
Specify the desired tone for your text. The
prefer_prefix allows falling back to the default tone if the language does not yet support tones.Values are
confident,default,diplomatic,enthusiastic,friendly,prefer_confident,prefer_diplomatic,prefer_enthusiastic, orprefer_friendly.
Body
Required
-
Text to be improved. Only UTF-8-encoded plain text is supported. Improvements are returned in the same order as they are requested.
-
The language for the text improvement. Options currently available:
de- Germanen- English (unspecified variant, defaults toen-US)en-GB- English (British)en-US- English (American)es- Spanishfr- Frenchit- Italianpt- Portuguese (unspecified variant, defaults topt-PT)pt-BR- Portuguese (Brazilian)pt-PT- Portuguese (all Portuguese variants excluding Brazilian Portuguese)
Values are
de,en,en-GB,en-US,fr,it,pt,pt-BR, orpt-PT. -
Specify a style to rephrase your text in a way that fits your audience and goals. The
prefer_prefix allows falling back to the default style if the language does not yet support styles.Values are
academic,business,casual,default,simple,prefer_academic,prefer_business,prefer_casual, orprefer_simple. -
Specify the desired tone for your text. The
prefer_prefix allows falling back to the default tone if the language does not yet support tones.Values are
confident,default,diplomatic,enthusiastic,friendly,prefer_confident,prefer_diplomatic,prefer_enthusiastic, orprefer_friendly.
curl \
--request POST 'https://api.deepl.com/v2/write/rephrase' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--data '{"text":["this is a example sentence to imprve"],"target_lang":"de","writing_style":"academic","tone":"confident"}'
curl \
--request POST 'https://api.deepl.com/v2/write/rephrase' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'text=this+is+a+example+sentence+to+imprve&target_lang=de&writing_style=academic&tone=confident'
{
"text": [
"this is a example sentence to imprve"
],
"target_lang": "de",
"writing_style": "academic",
"tone": "confident"
}
# Headers
# Payload
{
"improvements": [
{
"detected_source_language": "en",
"text": "This is a sample sentence to improve."
}
]
}