background

Hi Translate API Documentation

Fast, accurate translation services designed for global markets including Africa, South Asia, Southeast Asia, and Latin America.

Introduction

Designed specificially for Transsion markets (Africa, South Asia, SE Asia, Latin America, EE1, etc.), this text translation interface provides rapid and precise linguistic processing. Our goal is to empower users to cross language barriers and communicate effectively on a global scale.

Base URL

All endpoints below are relative to the following base URL.

Productionhttps://api.translasion.com

Authentication & Security

Access is restricted to authorized partners. After onboarding, you will receive an app_key (identifier) and a secret (used for verification).

Signature Generation Interface

1. Generate Noncenonce = 4-digit random string
2. Concatenate String (Order matters)str = sprintf("%s&%s&%s&%s&%s", app_key, to, timestamp, secret, nonce)
3. Calculate MD5 Hashsig = md5(str)

Request Headers

Header KeyTypeRequiredFixed Value / Note
Content-TypestringYesapplication/json
X-Trace-IdstringYesUnique UUID per request
X-Install-IdstringNoBrowser flag or unique installation ID

API 1: Multi-text Translation

Post multiple strings for batch processing.

POST/v2/translate
ParameterTypeRequiredDescription
app_keystringYesPlatform-assigned app key
tostringYesTarget language code
textsstring[]YesArray of strings to translate
fromstringNoSource language code (defaults to auto-detect)
timestampintYesCurrent timestamp (secs). Valid for 5 mins.
noncestringYes4-digit random string
sigstringYesGenerated signature (MD5)
override_from_flagstringNo1: force source lang, 0: detect
system_langstringNoSystem language code
Multi-text Request JSON
json
{
    "app_key": "10025",
    "to": "en",
    "texts": [
        "Hello",
        "Good morning",
        "Welcome"
    ],
    "from": "auto",
    "timestamp": 1712345678,
    "nonce": "acbf",
    "sig": "f4e5a6b7c8d9e0f1g2h3i4j5"
}

API 2: Single-text Translation

Post a single string for immediate translation.

POST/v2/translate(same endpoint as API 1)
ParameterTypeRequiredDescription
app_keystringYesPlatform-assigned app key
tostringYesTarget language code
textstringYesA single string to translate
fromstringNoSource language (auto-detect if empty)
timestampintYesUnix timestamp (seconds)
noncestringYes4-digit random string
sigstringYesMD5 validation signature
system_langstringNoSystem language code
Single-text Request JSON
json
{
    "app_key": "10025",
    "to": "en",
    "text": "你好啊",
    "from": "zh",
    "timestamp": 1712345678,
    "nonce": "acbf",
    "sig": "f4e5a6b7c8d9e0f1g2h3i4j5"
}

Response Structure

1000: SUCCESSERROR: SIGNATURE / EXPIRED / KEY
  • • "app key incorrect" - Invalid app_key identifier
  • • "token expired" - Timestamp exceeds 5 min window
  • • "sig incorrect" - Signature verification failed
API 1 Response Example (Multi-text: result.texts is an array)
json
{
    "code": 1000,
    "message": "SUCCESS",
    "engine": "server",
    "result": {
        "source": "en",
        "texts": [
            "Translate content 1",
            "Translate content 2"
        ]
    },
    "track": "cd6e8bb1-5819-4c3b-8407-a2c20c096b45"
}
API 2 Response Example (Single-text: result.text is a string)
json
{
    "code": 1000,
    "message": "SUCCESS",
    "engine": "server",
    "result": {
        "source": "zh",
        "text": "hello"
    },
    "track": "gen-dd0f7aef-a879-4595-afaf-328172169b35"
}

API 3: Language List API

Query the list of supported languages for different translation modules.

Request FormatGET /v1/language_list?type=1&to=zh
Query ParamTypeRequiredDescription / Support Types
typeintYes1:Text, 2:STT, 3:TTS, 4:OCR, 5:TMS, 6:Human
tostringYesLang code for the "name" field localization
Language List Response Example
json
{
    "code": 1000,
    "data": [
        {
            "code": "vi",
            "name": "tiếng việt"
        },
        {
            "code": "en",
            "name": "English"
        },
        {
            "code": "zh",
            "name": "简体中文"
        }
    ],
    "message": "success"
}