Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.drain.lat/llms.txt

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

Translate

Base URL: https://drain.lat/api/v1/translate
Translate text into any supported language.
GET /api/v1/translate
text
string
required
The text to translate. Max 5000 characters.
to
string
required
Target language code (BCP-47 / ISO 639-1, e.g. es, fr, ja, zh).
from
string
Source language code. Defaults to auto for automatic detection.
curl "https://drain.lat/api/v1/translate?text=Hello&to=es&from=auto" \
  -H "x-api-key: YOUR_API_KEY"
original
string
The original input text.
translated
string
The translated text.
sourceLang
string
Detected or specified source language code.
targetLang
string
Target language code.
Response
{
  "original": "Hello",
  "translated": "Hola",
  "sourceLang": "en",
  "targetLang": "es",
  "scrapedAt": "2026-05-12T10:00:00.000Z"
}
Supports all languages available in Google Translate. Use ISO 639-1 codes for to and from (e.g. es for Spanish, fr for French, ja for Japanese, zh for Chinese).