TikTok Captcha
Overview
TikTok Captcha is a verification system used by TikTok to protect the platform from bots and spam. This captcha typically appears when registering a new account, logging in, or when unusual activity is detected.
Currently, extensions are available for all 4 captcha types on browsers. Please inbox admin to receive the extension. Provides all captcha types for browsers, emulators, and phones.

1. Create Task
Request
POST https://api.achicaptcha.com/createTask
Parameters
| Parameter | Data Type | Required? | Description |
|---|---|---|---|
clientKey | string | yes | API key |
task.type | string | yes | TiktokCaptchaTask |
task.image | string | yes | Base64 of the image |
task.subType | int | yes | Captcha type: 0 (Rotate captcha on browser), 1 (Slider captcha), 2 (Select 2 similar objects), 3 (Rotate captcha on phone, emulator), 5 (Select objects that satisfy the question) |
task.other | string | no | For subType 5, this field is required. The captcha question, for example: "Which of these objects neighs" |
Request Example
POST /createTask HTTP/1.1
Host: api.achicaptcha.com
Content-Type: application/json
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "TiktokCaptchaTask",
"image": "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wAARCADUAVQDAREAAhEBAxEB/8QAHQABAQACAwEBAQAAAAAAAAAAAAECBwQFBgMICf/EAEEQAAEDAgQDBQcDAgMGBwAAAAEAAgMEEQUGITESQVEHE2FxgRQiMkKRobEVI1LB0WJy4QgWJDND8Bc0U2OSovH/xAAbAQEBAAMBAQEAAAAAAAAAAAAAAQIFBgQDB//EADQRAQACAgEDAwEGBQQCAwAAAAABAgMRBBIhMQUTQVEGIjJhkbFCcYGh0RQjwfAzQ1KS4f/aAAwDAQACEQMRAD8A/poBp1WLIQEBFOaIckD7FAQVBNQgoQOiBdAQEUCIpQEUuiCANEBBbaoCBugBA+yBfVAvsgo+6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QLoBKCqB0VAKBdUL6KALIF0C6AgX9EBA3QEBAugc0EQVBCeqCX0QEBUCoHRBVRAfBAQEAICCXsUFBsqIgXsgXQAg1t23Zrfg2Bsw6AltRWgi4OzBuf6eq2fAwe7k6p8Q2nAwe7l6p8V/dp3I+XjmHHImPZelh/cmPKw2HqVu+Xm9nHMx5nw3nNz+ximY8z4bytYADQdFyjjVa9zNnFvkbIORFiNWxwDJ5LnYXupoerpGyMp2CZ/HLa7isWT7XUFKBe6AiiIvJQRAvdAKAgqAgDRBLoKgAoHogIJdAsOaKiqCggVFQOSCIF0GMkrIY3SSObHGwEuc42AHUqxG11vw1tj/21UlNM6DCKX28t0NRIeGM+Q3P2W3w+m3yRu86bfD6bfJG7zp0kXbVjLHgyUFHIy/wALeJpt55K9s+lU12tL2T6VTXa0vc5S7ScNzVIKf3qKut/5eU34v8p5/lani8PJx+89...(10460 chars omitted)...V7Q4rk8i3IvOS/eZexY2wFyvTDXyzAWT5qNlUXkiKiAJVRdUYlkBFEQQRQEC2yAghRCyCWQSyBZAsgWQW1kCyCoCCoqIqoFkVCiCKXVC3ooCKKKxIRkhCxZw+Zj8FjMPpFmJjHRYdL69ad0OidK+5LIM1V6WM3fQBZRD5TbagWWbCZZKsVRiqqCIIindVil0UJQEQ5XRV5oiHZA3sgKBzRBFSyIHS6AgWRQa3RCyAgHZFUahA5ofAdkVLoKgnOyKE6KgoBQUDVGSE2CBYWUVjyRU5qMtgAKCAAqKoGqErZVFCrHYAqjIBRAKoiAqj//Z",
"subType": 2
}
}Response
On success, the server will return errorId = 0 and taskId
{
"errorId": 0,
"taskId": "f2fc70d6-c76b-4fba-9480-205ac1fe9fb9"
}Image Samples to Send to Captcha Solving Server
On browser:
Field image = base64_outer_image|base64_inner_image


On emulator, phone:
Field image is base64 of 1 image, cropped to contain only the rotate captcha portion (with both circles, can have extra white space on margins, margin length is flexible)

2. Get Result
Request
POST https://api.achicaptcha.com/getTaskResult
Parameters
| Parameter | Data Type | Required? | Description |
|---|---|---|---|
clientKey | string | yes | API key from website |
taskId | string | yes | TaskId from step (1) |
Request Example
POST /getTaskResult HTTP/1.1
Host: api.achicaptcha.com
Content-Type: application/json
{
"clientKey": "Your API_KEY",
"taskId": "f2fc70d6-c76b-4fba-9480-205ac1fe9fb9"
}Response
{
"errorId": 0,
"status": "ready",
"solution": "x1,y1,x2,y2"
}Response Meaning
errorId = 0andstatus = ready: Successfully solved, read result insolutionerrorId = 1andstatus = processing: Captcha is being solved, wait 1-2 seconds and try againerrorId other than 0 and 1: System error, error code and description providedsolution:- For rotate captcha on browser: returns the length of the slider drag distance
- For rotate captcha on emulator, phone: returns the rotation angle, user calculates the drag distance using formula: Drag distance = (L / 180) * solution (where L is the distance from start to end position of the slider, measured from the center of the slider)
- For slider captcha: returns the x-axis coordinate to drag
- For select 2 similar objects captcha: returns pair of coordinates to click on the image "x1,y1,x2,y2"
- For select multiple objects that satisfy question captcha: returns coordinates to click on the image "x1,y1,x2,y2,x3,y3,..."
Integration Examples
import requests
import time
import base64
def solve_tiktok_captcha(image_base64, sub_type, question=None, api_key='YOUR_API_KEY'):
# Step 1: Create task
task = {
'type': 'TiktokCaptchaTask',
'image': image_base64,
'subType': sub_type
}
# If subType = 5, add other field (question)
if sub_type == 5 and question:
task['other'] = question
create_task_url = 'https://api.achicaptcha.com/createTask'
create_task_payload = {
'clientKey': api_key,
'task': task
}
response = requests.post(create_task_url, json=create_task_payload)
result = response.json()
if result['errorId'] != 0:
raise Exception(result.get('errorDescription', 'Unknown error'))
task_id = result['taskId']
# Step 2: Get result
get_result_url = 'https://api.achicaptcha.com/getTaskResult'
while True:
time.sleep(2) # Wait 2 seconds
get_result_payload = {
'clientKey': api_key,
'taskId': task_id
}
response = requests.post(get_result_url, json=get_result_payload)
result = response.json()
if result['errorId'] == 0 and result.get('status') == 'ready':
return result['solution']
if result['errorId'] == 1 and result.get('status') == 'processing':
# Continue waiting
continue
# Other errors
raise Exception(result.get('errorDescription', 'Unknown error'))
# Usage - Example with select 2 objects captcha (subType = 2)
with open('captcha_image.png', 'rb') as f:
image_base64 = base64.b64encode(f.read()).decode('utf-8')
sub_type = 2 # 0: Rotate browser, 1: Slider, 2: Select 2 objects, 3: Rotate phone, 5: Select by question
solution = solve_tiktok_captcha(image_base64, sub_type, api_key='YOUR_API_KEY')
print('TikTok captcha solution:', solution) # "x1,y1,x2,y2"Common Error Codes
Error Codes When Creating Task
| Error Code | Description | Notes |
|---|---|---|
| 0 | success | Task created successfully |
| 2 | missing required fields | Missing required fields, check parameters (image, subType) |
| 3 | task not supported | Task type not supported |
| 4 | task creation failed | Task creation failed, try again later |
| 5 | client key does not exist | API key does not exist, check your API key |
| 6 | insufficient account balance | Insufficient account balance, add more credits |
Error Codes When Getting Result
| Error Code | Description | Notes |
|---|---|---|
| 0 | success | Success, read result in solution field |
| 1 | processing | Processing, wait 1-2 seconds and send request again |
| 5 | client key does not exist | API key does not exist, check your API key |
| 7 | task failed, please create a new task | Task failed, please create a new task |
| 8 | task ID does not exist | Task ID does not exist or has expired |
Best Practices
To achieve the best results when using Achicaptcha API, follow these principles:
1. Identify the Correct Captcha Type and subType
- TikTok uses various types of captcha
- Accurately detect the type of captcha being displayed
- Send the correct
subTypein the request:0: Rotate captcha on browser1: Slider captcha2: Select 2 similar objects3: Rotate captcha on phone, emulator5: Select objects that satisfy the question (requiresotherfield)
2. Format Images Correctly
- Rotate captcha on browser: Send
base64_outer_image|base64_inner_image - Rotate captcha on phone/emulator: Send base64 of 1 image (containing only the rotate captcha portion)
- Other types: Send base64 of the corresponding image
- Ensure images are encoded in proper base64 format
3. Handle Results Properly
- For rotate captcha on emulator/phone: Calculate drag distance using formula: Drag distance = (L / 180) * solution
- For select objects captcha: Parse coordinate string "x1,y1,x2,y2" to get click points
- For slider captcha: Use the returned x coordinate to drag the slider
4. Polling Interval
- Wait at least 1-2 seconds between result checks
- Don't spam the API with too many consecutive requests
- Have a timeout to avoid infinite loops (recommended 120 seconds)
5. Error Handling
- Check for
errorId = 1andstatus = processingto continue waiting - Handle other errors appropriately
- Implement retry logic for temporary errors
6. API Key Security
- Don't hardcode API key in code
- Use environment variables
- Don't expose API key on client-side
Useful Links: