Dark Mode

Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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:

  • Manual Deploy:

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

Netlify

  • One-Click Deploy:

  • Manual Deploy:

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

Cloudflare Workers

  • One-Click Deploy:

  • 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": "Ni Hao ,Shi Jie ",
"alternatives": [
"Shi Jie ,Ni Hao ",
"Shi Jie Ni Hao ",
"Nin Hao ,Shi Jie "
]
}

About

DeepLX Free Deployment Translation API

Topics

Resources

Readme

Stars

Watchers

Forks

Packages

Contributors