Pre-production checklist

Here's what we recommend reviewing to get your DeepL API application ready for production.

The fact that our pre-production checklist is published in the "Getting Started" section of the documentation is not a mistake!

We believe it's useful information to have as you start exploring our product and thinking through your use case.

  1. Error handling: If you receive 429 or 500 errors, use retries with exponential backoff. If you use one of DeepL's official client libraries, you get this functionality out-of-the-box.

  2. Persistent HTTP connection: Especially for use cases with low latency requirements, we recommend using a persistent HTTP connection. DeepL's official client libraries use Keep-Alive by default.

  3. Use the correct content type: For text translation (the /translate endpoint), use form-encoded (Content-Type: application/x-www-form-urlencoded) or JSON-encoded (Content-Type: application/json) request bodies.

    • Uploading a file for document translation requires an HTTP POST request with Content-Type: multipart/form-data; this content type should not be used for text translation.

  4. No query parameters: Please do not make API requests using query parameters. The examples throughout the API reference include properly formed HTTP POST requests. For security reasons, be especially sure not to send your authentication key via query parameters.

  5. CORS requests: It's not possible to send requests to the DeepL API from the browser, as requests to third-party APIs from front-end applications would expose your credentials on the web. You can learn more here.

  6. Translation context: DeepL considers the broader context of a source text or document when translating. In general, including more context in a source text or document can result in a higher-quality DeepL translation. For text translation, you can also try the context parameter. Learn more about working with context here.

  7. Cache results from translation requests: Storing API responses lets apps serve content faster and avoids extra costs from repeated requests for unchanged content.

Last updated