5-Minute Tutorial: Thai ID Card OCR with iApp AI
This quick tutorial will show you how to get started with Thai ID Card OCR using iApp AI APIs in just 5 minutes.
Step 1: Get Your API Keyโ
- Go to iApp AI Platform
- Click "Sign Up" to create a new account
- After logging in, go to "API Keys" section
- Click "Generate New API Key"
- Copy your API key - you'll need this to make API calls
Step 2: Make Your First API Callโ
You can make API calls using either cURL or your preferred programming language:
Using cURLโ
curl -X POST https://api.iapp.co.th/thai-national-id-card/v3.5/front \
-H "apikey: YOUR_API_KEY" \
-F "file=@/path/to/id-card.jpg"
Using Pythonโ
import requests
# Your API key from iApp AI Platform
API_KEY = "YOUR_API_KEY"
# API endpoint for Thai ID Card OCR
url = "https://api.iapp.co.th/thai-national-id-card/v3.5/front"
# Prepare the image file
files = {
'file': open('id-card.jpg', 'rb')
}
# Add your API key to headers
headers = {
'apikey': API_KEY
}
# Make the API request
response = requests.post(url, headers=headers, files=files)
# Print the extracted information
print(response.json())
Step 3: Understanding the Responseโ
The API will return a JSON response containing extracted information like:
- ID number
- Name in Thai and English
- Date of birth
- Address
- And more