Host a serverless translation API on Vercel, powered by the official DeepLX Go implementation.
- Serverless by Design: Built on a serverless architecture for superior scalability and simplicity.
- Effortless Deployment: Deploy to Vercel with a single click and minimal configuration.
- Local Development Support: Fully supports local development for testing and customization.
- Official DeepLX Compatibility: Always stays in sync with the latest official
DeepLX
API.
Deploy your DeepLX translation API by clicking the button below.
After clicking the button, simply follow the prompts to set up the API on Vercel.
To run/test this API locally, you need to install Vercel CLI and Go, and then run the following commands in your terminal:
git clone https://github.com/xjasonlyu/vercel-deeplx.git
cd vercel-deeplx
vercel dev
This will start a local dev server with the API running on http://localhost:3000
.
Variable | Description | Default |
---|---|---|
TOKEN |
Access token to protect your API | NULL |
PROXY |
The http proxy server address | NULL |
DL_SESSION |
DeepL Pro Account dl_session cookie |
NULL |
The above environment variables are optional and only need to be configured on Vercel when required. See variables for more details.
Once deployed or running locally, you can start making requests to translate text.
For example, make a POST
request to /translate
with the following cURL command:
Replace
https://your-deployment-url
with the actual URL of your Vercel deployment orhttp://localhost:3000
if you're running locally.
curl -X POST https://your-deployment-url/translate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <your_access_token>" \
-d '{
"text": "Hello, world!",
"source_lang": "EN",
"target_lang": "DE"
}'
For more detailed cURL usage and examples, see here.
- Rate Limiting: Excessive requests may result in temporary blocking by DeepL. Please avoid sending too many requests in a short period.
- Usage Limitations: This API is intended for personal or development use. For commercial use, consider subscribing to DeepL's official API.
- No Guarantee: As this API relies on DeepL's public endpoints, functionality may break if DeepL changes their API. Please report issues or contribute fixes if this occurs.
- To manually update, go to the Actions tab and run the workflow.
- This workflow is also automatically triggered on a daily basis.
Contributions are welcome! If you have a suggestion or fix, please fork the repository and submit a PR.
This project is open-sourced under the MIT license. See the LICENSE file for more details.