Overview

AI For Thai is a specialized API platform offering a collection of artificial intelligence services tailored for the Thai language. Established in 2019, the platform provides developers and technical buyers with tools to integrate advanced Thai language capabilities into their applications and systems. Its core product offerings span natural language processing (NLP), speech technology, and optical character recognition (OCR).

For NLP, AI For Thai includes services like Word Segmentation (tokenize), which breaks Thai text into meaningful units; Part-of-Speech Tagging (pos), which identifies the grammatical role of each word; and Named Entity Recognition (ner), for identifying and classifying entities such as names, organizations, and locations within text. The platform also supports Text Summarization, designed to generate concise summaries of longer Thai documents, and Sentiment Analysis, which can determine the emotional tone of Thai text.

In the domain of speech technology, AI For Thai offers Speech Recognition (speech) to convert spoken Thai into text, and Text-to-Speech (tts) to synthesize natural-sounding Thai speech from written input. Additionally, its Optical Character Recognition (ocr) service is designed to extract Thai text from images, facilitating the digitization of documents and other visual content. These services collectively enable the development of applications ranging from Thai-speaking chatbots and customer support systems to content analysis tools and accessibility features. The platform is best suited for scenarios requiring precise and contextually aware Thai language processing, such as local market analysis, educational software, or government services.

Developers using AI For Thai can access comprehensive documentation including API reference guides and code examples in Python and JavaScript. This aims to streamline integration into common development environments. The platform offers a free tier for non-commercial use, providing up to 1000 requests per month for most APIs, with commercial plans available for higher usage and production environments.

Key features

  • Word Segmentation (tokenize): Breaks down continuous Thai text into individual words or meaningful tokens, essential for subsequent NLP tasks.
  • Part-of-Speech Tagging (pos): Assigns grammatical labels (e.g., noun, verb, adjective) to each word in a Thai sentence, aiding in syntactic analysis.
  • Named Entity Recognition (ner): Identifies and categorizes proper nouns and time expressions within Thai text into predefined categories like person, organization, location, and date.
  • Text Summarization (summarize): Generates concise summaries of longer Thai documents or articles, extracting key information.
  • Sentiment Analysis (sentiment): Determines the emotional tone or sentiment (e.g., positive, negative, neutral) expressed in Thai text.
  • Machine Translation (mt): Translates text between Thai and other languages, facilitating cross-lingual communication.
  • Speech Recognition (speech): Converts spoken Thai language into written text, useful for voice-controlled interfaces and transcription services.
  • Text-to-Speech (tts): Synthesizes natural-sounding Thai speech from written text input, enabling voice assistants and audio content generation.
  • Optical Character Recognition (ocr): Extracts editable Thai text from images, scanned documents, or PDFs, allowing for digital processing of visual content.

Pricing

AI For Thai offers a free tier for non-commercial use and various paid plans for commercial applications. Pricing is as of May 2026. For current pricing details and specific plan inclusions, refer to the official AI For Thai pricing page.

Plan Name Monthly Cost (THB) Monthly Requests (approx.) Key Features
Free Tier 0 1,000 Non-commercial use, access to most APIs, basic support.
Startup Plan 1,500 50,000 Commercial use, increased request limits, standard support.
Business Plan 5,000 200,000 Higher request limits, priority support, additional features.
Enterprise Plan Custom Custom Tailored solutions, dedicated support, custom SLAs.

Common integrations

AI For Thai's APIs can be integrated into various systems and applications due to their RESTful nature and available SDKs. Common integration scenarios include:

  • Chatbot Platforms: Integrate with platforms like Dialogflow or custom chatbot frameworks to enable advanced Thai language understanding and generation, such as using sentiment analysis for customer service bots or named entity recognition for information extraction.
  • Content Management Systems (CMS): Automate the processing of Thai textual content, including summarization for articles or sentiment analysis for user comments within platforms like WordPress or Drupal.
  • Data Analytics Platforms: Incorporate Thai NLP capabilities into data analytics pipelines, potentially using tools like Apache Spark or Google BigQuery. This allows for deeper textual insights from Thai-language datasets.
  • E-commerce Platforms: Enhance product search, customer review analysis, and personalized recommendations for Thai-speaking users on platforms such as Magento or Shopify, using features like part-of-speech tagging for better search relevance.
  • Mobile Applications: Develop iOS and Android applications with voice commands or text input in Thai, leveraging speech recognition and text-to-speech APIs for interactive user experiences.
  • CRM Systems: Improve customer relationship management by analyzing Thai customer interactions (e.g., emails, chat logs) for sentiment and key information, integrating with systems like Salesforce.
  • Document Processing Workflows: Automate the extraction of Thai text from images or scanned documents using OCR, streamlining data entry and archiving processes in enterprise resource planning (ERP) or document management systems.

Alternatives

For developers seeking alternatives, several platforms offer similar or broader language AI capabilities, though often with varying levels of specialization for the Thai language:

  • Google Cloud Natural Language AI: Provides pre-trained models for various NLP tasks across multiple languages, including some support for Thai, alongside custom model capabilities.
  • Azure AI Language: Offers a suite of AI services for understanding and processing text, supporting many languages with features like entity recognition, sentiment analysis, and translation.
  • OpenAI: Known for its large language models like GPT, which can process and generate text across numerous languages, including Thai, often delivering high-quality results for general-purpose tasks.

Getting started

To begin using AI For Thai, developers typically obtain an API key from the developer console after signing up. The following Python example demonstrates how to use the Word Segmentation (tokenize) API to process Thai text. This example utilizes the requests library for making HTTP POST requests to the API endpoint.


import requests
import json

# Replace with your actual API key
API_KEY = "YOUR_API_KEY"

# Define the API endpoint for word segmentation
endpoint = "https://api.aiforthai.in.th/t-tokenize"

# The text you want to tokenize
text_to_tokenize = "สวัสดีครับวันนี้อากาศดีมาก"

# Headers including content-type and API key
headers = {
    "Content-Type": "application/json",
    "apikey": API_KEY
}

# Data payload for the request
data = {
    "text": text_to_tokenize
}

try:
    # Make the POST request to the API
    response = requests.post(endpoint, headers=headers, data=json.dumps(data))
    response.raise_for_status()  # Raise an HTTPError for bad responses (4xx or 5xx)

    # Parse the JSON response
    result = response.json()

    # Print the tokenized words
    print(f"Original Text: {text_to_tokenize}")
    print("Tokenized Words:")
    for word in result.get("words", []):
        print(f"- {word}")

except requests.exceptions.HTTPError as http_err:
    print(f"HTTP error occurred: {http_err} - {response.text}")
except requests.exceptions.ConnectionError as conn_err:
    print(f"Connection error occurred: {conn_err}")
except requests.exceptions.Timeout as timeout_err:
    print(f"Timeout error occurred: {timeout_err}")
except requests.exceptions.RequestException as req_err:
    print(f"An unexpected error occurred: {req_err}")
except json.JSONDecodeError:
    print(f"Failed to decode JSON from response: {response.text}")

This Python script sends a request to the t-tokenize endpoint with the specified Thai text and prints the segmented words. Developers can find more detailed examples and API specifications in the AI For Thai documentation portal.