Skip to main content

🇹🇭🇬🇧 Thai/English Text Translation

🇹🇭🇬🇧 การแปลภาษาไทย/อังกฤษ

Version Status

Welcome to iApp Thai/English Text Translation API, an AI product developed by iApp Technology Co., Ltd. Our API provides seamless translation between Thai and English languages with high accuracy and speed. The system automatically detects the input language and translates it to the target language.

Try Demo

Visit our API Portal to test the Thai/English Text Translation API with your own text.

Getting Started

  1. Prerequisites

    • An API key from iApp Technology
    • Text input in Thai or English
    • Internet connection
  2. Quick Start

    • Fast processing (< 0.1 seconds per request)
    • Automatic language detection
    • Bidirectional translation (Thai ↔ English)
  3. Key Features

    • Automatic language detection
    • High accuracy translation
    • Fast response time
    • Simple REST API interface
  4. Security & Compliance

    • GDPR and PDPA compliant
    • No data retention after processing
How to get API Key?

Please visit API Portal to view your existing API key or request a new one.

Example

Thai to English Translation

Request:

    curl --location 'https://api.iapp.co.th/translate/auto?text=สวัสดี' \
--header 'apikey: {YOUR API KEY}'

Response:

{
"text": {
"language": "ภาษาไทย",
"text": "สวัสดี"
},
"time_process": 0.08882856369018555,
"translation": {
"language": "English",
"text": "Hello!"
}
}

English to Thai Translation

Request:

    curl --location 'https://api.iapp.co.th/translate/auto?text=Hello' \
--header 'apikey: {YOUR API KEY}'

Response:

{
"text": {
"language": "English",
"text": "Hello"
},
"time_process": 0.07249641418457031,
"translation": {
"language": "ภาษาไทย",
"text": "สวัสดี"
}
}

Features and Capabilities

Core Features

  • Seamless Thai-English and English-Thai text translation.
  • Accepts English text to generate accurate Thai translations and vice versa.
  • Designed for fast and reliable language conversion.

Supported Fields

  • Input text in English or Thai.
  • Translated text output in the target language.
  • High accuracy.

Additional Capabilities

  • Ideal for applications requiring bilingual support between Thai and English.
  • Supports a wide range of use cases, including chat applications, content localization, and language learning tools.

API Reference

Endpoint

GET https://api.iapp.co.th/translate/auto

Query Parameters

NameTypeDescription
textStringInput Text in Thai or English language

Headers

NameTypeDescription
apikeyStringAPI Key

Code Examples

Python

import requests

url = "https://api.iapp.co.th/translate/auto?text={YOUR TEXT}"

payload = {}
headers = {
'apikey': '{YOUR API KEY}'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)

JavaScript

const axios = require('axios');

let config = {
method: 'get',
maxBodyLength: Infinity,
url: 'https://api.iapp.co.th/translate/auto?text={YOUR TEXT}',
headers: {
'apikey': '{YOUR API KEY}'
}
};

axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});

PHP

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.iapp.co.th/translate/auto?text={YOUR TEXT}',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => array(
'apikey: {YOUR API KEY}'
),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Swift

var request = URLRequest(url: URL(string: "https://api.iapp.co.th/translate/auto?text={YOUR TEXT}")!,timeoutInterval: Double.infinity)
request.addValue("{YOUR API KEY}", forHTTPHeaderField: "apikey")

request.httpMethod = "GET"

let task = URLSession.shared.dataTask(with: request) { data, response, error in
guard let data = data else {
print(String(describing: error))
return
}
print(String(data: data, encoding: .utf8)!)
}

task.resume()

Kotlin

val client = OkHttpClient()
val request = Request.Builder()
.url("https://api.iapp.co.th/translate/auto?text={YOUR TEXT}")
.addHeader("apikey", "{YOUR API KEY}")
.build()
val response = client.newCall(request).execute()

Java

OkHttpClient client = new OkHttpClient().newBuilder()
.build();
MediaType mediaType = MediaType.parse("text/plain");
RequestBody body = RequestBody.create(mediaType, "");
Request request = new Request.Builder()
.url("https://api.iapp.co.th/translate/auto?text={YOUR TEXT}")
.method("GET", body)
.addHeader("apikey", "{YOUR API KEY}")
.build();
Response response = client.newCall(request).execute();

Dart

var headers = {
'apikey': '{YOUR API KEY}'
};
var request = http.Request('GET', Uri.parse('https://api.iapp.co.th/translate/auto?text={YOUR TEXT}'));

request.headers.addAll(headers);

http.StreamedResponse response = await request.send();

if (response.statusCode == 200) {
print(await response.stream.bytesToString());
}
else {
print(response.reasonPhrase);
}

Pricing

AI API Service NameEndpointIC Per CharactersOn-Premise
Thai - English Machine Translation (MT)iapp_thai_machine_translation_v11 IC/400 CharactersContact