Skip to content

lete114/deeplx-serverless

Repository files navigation

DeepLX Serverless

A free-to-deploy translation API, compatible with OwO-Network/DeepLX, built with serverless platforms to avoid frequent request issues such as HTTP 429 Too Many Requests.

Tip

For better security and to prevent misuse, it’s strongly recommended to configure a token. Multiple tokens can be set using commas (,).

🚀 Deployment

Click the one-click deploy buttons below, or fork the repository and configure the deployment manually.

Vercel

  • One-Click Deploy:

    Deploy with Vercel

  • Manual Deploy:

    1. Create a new project in Vercel (or import your forked repository)
    2. Go to the project → SettingsBuild and Development
    3. Set Root Directory to: platform/vercel
    4. Go to Environment Variables Add an environment variable: token (Optional)

Netlify

  • One-Click Deploy:

    Deploy to Netlify

  • Manual Deploy:

    1. Fork this repository and import it into Netlify
    2. Go to Site Settings Project configurationBuild & DeployBuild settings
    3. Set Package directory to: platform/netlify
    4. Go to Environment Variables Add an environment variable: token (Optional)

Cloudflare Workers

  • One-Click Deploy:

    Deploy to Cloudflare

  • Manual Deploy:

    1. In a similar way to Vercel and Netlify, Fork this repository and imported, with access to set up the specified deployment path and configure token.

📦 Usage

Request Example

curl 'https://your-api-address/translate?token=your-token' \
--header 'Content-Type: application/json' \
--data '{
  "text": "Hello, World",
  "from": "en",
  "to": "zh"
}'

# Or use Authorization header
curl 'https://your-api-address/translate' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer your-token' \
--data '{
  "text": "Hello, World",
  "from": "en",
  "to": "zh"
}'

Response Example

{
  "code": 200,
  "id": 145289000,
  "method": "Free",
  "from": "EN",
  "to": "ZH",
  "source_lang": "EN",
  "target_lang": "ZH",
  "data": "你好,世界",
  "alternatives": [
    "世界,你好",
    "世界你好",
    "您好,世界"
  ]
}

Packages

No packages published