Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/OwO-Network/DeepLX/llms.txt

Use this file to discover all available pages before exploring further.

This guide will help you deploy DeepLX and make your first translation request.

Run DeepLX

1

Start with Docker

The fastest way to run DeepLX is using Docker:
docker run -d -p 1188:1188 ghcr.io/owo-network/deeplx:latest
This starts DeepLX on port 1188 (default) listening on all interfaces.
DeepLX supports several environment variables and flags (service/config.go:21-75):
OptionEnvironment VariableFlagDefaultDescription
IP AddressIP-ip, -i0.0.0.0Bind address
PortPORT-port, -p1188Listen port
Access TokenTOKEN-token""Authentication token
DL SessionDL_SESSION-s""Pro account session
ProxyPROXY-proxy""HTTP proxy URL
Example with authentication:
docker run -d -p 1188:1188 -e TOKEN=your_secret_token ghcr.io/owo-network/deeplx:latest
Example with custom port:
docker run -d -p 9000:9000 -e PORT=9000 ghcr.io/owo-network/deeplx:latest
2

Verify the service is running

Check that DeepLX is responding:
curl http://localhost:1188/
Expected response (service/service.go:101-106):
{
  "code": 200,
  "message": "DeepL Free API, Developed by sjlleo and missuo. Go to /translate with POST. http://github.com/OwO-Network/DeepLX"
}
3

Make your first translation request

Translate text from English to German:
curl -X POST http://localhost:1188/translate \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello, World!",
    "source_lang": "EN",
    "target_lang": "DE"
  }'
curl -X POST http://localhost:1188/translate \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello, World!",
    "source_lang": "EN",
    "target_lang": "DE"
  }'
4

Review the response

A successful translation returns (service/service.go:134-142):
{
  "code": 200,
  "id": 8912375012,
  "data": "Hallo, Welt!",
  "alternatives": [
    "Hallo Welt!",
    "Servus Welt!"
  ],
  "source_lang": "EN",
  "target_lang": "DE",
  "method": "Free"
}
Response fields:
  • code: HTTP status code
  • id: Unique request identifier
  • data: Primary translated text
  • alternatives: Alternative translation options
  • source_lang: Detected or specified source language
  • target_lang: Target language code
  • method: Translation method used (Free or Pro)

Request Parameters

The /translate endpoint accepts (service/service.go:63-68):
ParameterTypeRequiredDescription
textstringYesText to translate
source_langstringNoSource language code (auto-detected if omitted)
target_langstringYesTarget language code
tag_handlingstringNoHandle HTML/XML tags: "html" or "xml"
When source_lang is empty or "auto", DeepLX automatically detects the source language (translate/translate.go:120-122).

Authentication (Optional)

If you configured DeepLX with a TOKEN, include it in requests: Query parameter:
curl -X POST "http://localhost:1188/translate?token=your_secret_token" \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello", "target_lang": "DE"}'
Authorization header (service/service.go:33-46):
curl -X POST http://localhost:1188/translate \
  -H "Authorization: Bearer your_secret_token" \
  -H "Content-Type: application/json" \
  -d '{"text": "Hello", "target_lang": "DE"}'
DeepLX supports both Bearer and DeepL-Auth-Key authorization formats for compatibility.

Error Handling

If you see HTTP 429, your IP has been temporarily blocked by DeepL for making too many requests (translate/translate.go:78-80). Wait before retrying.
Common error responses: Invalid token:
{
  "code": 401,
  "message": "Invalid access token"
}
Invalid tag_handling:
{
  "code": 400,
  "message": "Invalid tag_handling value. Allowed values are 'html' and 'xml'."
}
No text provided:
{
  "code": 404,
  "message": "No text to translate"
}

Next Steps

API Reference

Explore all available endpoints and parameters

Configuration

Learn about advanced configuration options

Deployment

Deploy DeepLX to production environments

GitHub

View source code and contribute