Chinda Thai LLM 4B
Welcome to Chinda Thai LLM 4B API, an open-source Thai Large Language Model developed by iApp Technology in collaboration with AIEAT (AI Engineering Association of Thailand). Chinda is powered by the Qwen3 4B architecture, optimized for Thai language understanding and generation.
Try Demo
Start a conversation with the AI assistant
Type your message below and press Enter or click SendOverview
Chinda (จินดา) is Thailand's first community-driven open-source LLM, designed to provide powerful Thai language AI capabilities. The model supports both streaming and non-streaming inference for chat completions.
Key Features
- Thai-Optimized: Fine-tuned specifically for Thai language understanding and generation
- Open Source: Available for both API access and local deployment
- OpenAI Compatible: Follows OpenAI API format for easy integration
- Streaming Support: Real-time token streaming for responsive applications
- 40K Context: Supports up to 40,960 tokens context length
- Free Access: No cost until December 31, 2025
Getting Started
-
Prerequisites
- An API key from iApp Technology
- Internet connection
-
Quick Start
- Simple REST API interface
- OpenAI-compatible format
- Both streaming and non-streaming support
-
Rate Limits
- 5 requests per second
- 200 requests per minute
Please visit API Key Management page to view your existing API key or request a new one.
API Endpoints
| Endpoint | Method | Description | Cost |
|---|---|---|---|
/v3/llm/chinda-thaillm-4b/chat/completions | POST | Chat completions (streaming & non-streaming) | FREE (0 IC) |
/v3/llm/chinda-thaillm-4b/completions | POST | Text completions | FREE (0 IC) |
/v3/llm/chinda-thaillm-4b/models | GET | List available models | FREE (0 IC) |
Code Examples
cURL - Non-Streaming
curl -X POST 'https://api.iapp.co.th/v3/llm/chinda-thaillm-4b/chat/completions' \
-H 'apikey: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "chinda-qwen3-4b",
"messages": [
{"role": "user", "content": "สวัสดีครับ คุณช่วยอะไรได้บ้าง?"}
],
"max_tokens": 4096
}'
cURL - Streaming
curl -X POST 'https://api.iapp.co.th/v3/llm/chinda-thaillm-4b/chat/completions' \
-H 'apikey: YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "chinda-qwen3-4b",
"messages": [
{"role": "user", "content": "อธิบายเกี่ยวกับ AI ให้หน่อย"}
],
"max_tokens": 4096,
"stream": true
}'
Response (Non-Streaming)
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1700000000,
"model": "chinda-qwen3-4b",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "สวัสดีครับ! ผมเป็น Chinda ผู้ช่วย AI ภาษาไทย ผมสามารถช่วยคุณได้หลายอย่าง เช่น:\n\n1. ตอบคำถามทั่วไป\n2. ช่วยเขียนข้อความ\n3. อธิบายเรื่องต่างๆ\n4. แปลภาษา\n5. ช่วยคิดไอเดีย\n\nมีอะไรให้ช่วยไหมครับ?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 15,
"completion_tokens": 89,
"total_tokens": 104
}
}
Python
import requests
import json
url = "https://api.iapp.co.th/v3/llm/chinda-thaillm-4b/chat/completions"
payload = {
"model": "chinda-qwen3-4b",
"messages": [
{"role": "user", "content": "สวัสดีครับ คุณช่วยอะไรได้บ้าง?"}
],
"max_tokens": 4096
}
headers = {
'apikey': 'YOUR_API_KEY',
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, json=payload)
print(response.json())
Python - Streaming
import requests
import json
url = "https://api.iapp.co.th/v3/llm/chinda-thaillm-4b/chat/completions"
payload = {
"model": "chinda-qwen3-4b",
"messages": [
{"role": "user", "content": "อธิบายเกี่ยวกับ AI"}
],
"max_tokens": 4096,
"stream": True
}
headers = {
'apikey': 'YOUR_API_KEY',
'Content-Type': 'application/json'
}
response = requests.post(url, headers=headers, json=payload, stream=True)
for line in response.iter_lines():
if line:
line = line.decode('utf-8')
if line.startswith('data: '):
data = line[6:]
if data != '[DONE]':
chunk = json.loads(data)
content = chunk['choices'][0]['delta'].get('content', '')
print(content, end='', flush=True)
JavaScript / Node.js
const axios = require('axios');
const url = 'https://api.iapp.co.th/v3/llm/chinda-thaillm-4b/chat/completions';
const payload = {
model: 'chinda-qwen3-4b',
messages: [
{ role: 'user', content: 'สวัสดีครับ คุณช่วยอะไรได้บ้าง?' }
],
max_tokens: 4096
};
const config = {
headers: {
'apikey': 'YOUR_API_KEY',
'Content-Type': 'application/json'
}
};
axios.post(url, payload, config)
.then(response => {
console.log(response.data.choices[0].message.content);
})
.catch(error => {
console.error(error);
});
PHP
<?php
$curl = curl_init();
$payload = json_encode([
'model' => 'chinda-qwen3-4b',
'messages' => [
['role' => 'user', 'content' => 'สวัสดีครับ คุณช่วยอะไรได้บ้าง?']
],
'max_tokens' => 4096
]);
curl_setopt_array($curl, [
CURLOPT_URL => 'https://api.iapp.co.th/v3/llm/chinda-thaillm-4b/chat/completions',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $payload,
CURLOPT_HTTPHEADER => [
'apikey: YOUR_API_KEY',
'Content-Type: application/json'
],
]);
$response = curl_exec($curl);
curl_close($curl);
$result = json_decode($response, true);
echo $result['choices'][0]['message']['content'];
API Reference
Headers
| Parameter | Type | Required | Description |
|---|---|---|---|
| apikey | String | Yes | Your API key |
| Content-Type | String | Yes | application/json |
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | String | Yes | Model name: chinda-qwen3-4b |
| messages | Array | Yes | Array of message objects with role and content |
| max_tokens | Integer | No | Maximum tokens to generate (default: 4096, max: 40960) |
| stream | Boolean | No | Enable streaming response (default: false) |
| temperature | Float | No | Sampling temperature 0-2 (default: 0.7) |
| top_p | Float | No | Nucleus sampling (default: 0.9) |
Message Object
| Field | Type | Description |
|---|---|---|
| role | String | system, user, or assistant |
| content | String | The message content |
Model Information
| Property | Value |
|---|---|
| Model Name | chinda-qwen3-4b |
| Base Model | Qwen3 4B |
| Context Length | 40,960 tokens |
| Languages | Thai, English |
| License | Open Source |
Use Cases
- Chatbots: Build Thai-speaking conversational AI assistants
- Content Generation: Generate Thai content for articles, social media, and marketing
- Translation: Translate between Thai and English
- Q&A Systems: Answer questions in Thai
- Code Assistance: Help with programming questions (with Thai explanations)
- Education: Thai language tutoring and explanations
Open Source
Chinda is also available as an open-source model that you can run locally:
- Hugging Face: iapp/chinda-qwen3-4b
For tutorials on running Chinda locally, see:
Pricing
| AI API Service Name | Endpoint | IC Cost | On-Premise |
|---|---|---|---|
| Chinda Thai LLM 4B [v1.0] | /v3/llm/chinda-thaillm-4b/chat/completions | FREE (until Dec 31, 2025) Input: 0.00 IC / 1K tokens | Contact |
Support
For support and questions:
- Discord: Join our community
- Email: support@iapp.co.th
- Documentation: Full API Docs