# Translate — Zapi reference > Translate text between languages. **Base URL:** `https://api.zpi.web.id` **Auth:** Send `x-api-key: YOUR_KEY` header on every request. Get a free key at https://zpi.web.id/dashboard/keys. **Response envelope:** `{ status, message, content }` **Rate limit:** 60 req/min on free tier. **Related:** - Detail page: https://zpi.web.id/api/web-tools/translate - Endpoint catalog: https://zpi.web.id/category/web-tools - Concise index: https://zpi.web.id/llms.txt - Full reference: https://zpi.web.id/llms-full.txt --- ## Translate **Category:** web-tools · **Slug:** `translate` **Detail page:** https://zpi.web.id/api/web-tools/translate Translate text between languages. **Tags:** utility, translate, i18n ### Translate Text Translate input text from a source to a target language. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/web-tools:translate/translate` - **Cache TTL:** 300s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `text` | string | query | yes | Text to translate (max 5KB) | | `from` | string | query | no | Source language (ISO 639-1). Default en | | `to` | string | query | no | Target language (ISO 639-1). Default id | **cURL:** ```bash curl "https://api.zpi.web.id/v1/web-tools:translate/translate?text=Hello%20world&from=en&to=id" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/web-tools:translate/translate?text=Hello%20world&from=en&to=id", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/web-tools:translate/translate?text=Hello%20world&from=en&to=id", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "ok": true, "match": 0.99, "sourceText": "Hello world", "translatedText": "Halo dunia" } ``` --- _Generated: 2026-08-02T14:23:16.011Z_