HCaptcha Images Recognize
WARNING
Create the task with the createTask.
This interface does not need to obtain the results separately, will synchronously return the image recognition results!
hCaptcha SERVICE INSTABILITY ANNOUNCEMENT
We apologize for the recent instability of the hCaptcha service caused by image updates and other issues. We deeply regret any inconvenience caused. If you encounter new images that render the service unavailable, please wait for us to update them. For any other questions, feel free to contact us at any time.
The task type
is as follows
HCaptchaClassification
Create Task
Create the task with the createTask.
Task Object Structure
Properties | Type | Required | Description |
---|---|---|---|
type | String | Required | HCaptchaClassification |
websiteURL | String | Optional | Page source url to improve accuracy |
websiteKey | String | Optional | Website key to improve accuracy |
queries | List[string] | Required | Base64 encoded image, do not include "data:image/***; base64," Assembles the picture as a list: [base64,base64,base64...] |
question | String | Required | English is supported only. Please convert other languages by yourself |
WARNING
queries parameter image count description
select Sorting problem, only 18 images can be recognized at one time.
draw a box problem, only one image can be recognized at a time.
Supported Types
The supported image types are as follows:
Type | Question |
---|---|
![]() | Please click each image containing a chair |
![]() | duck$penguin$shark$elephant |
![]() | please click on the panda |
Example Request
POST https://api.capsolver.com/createTask
Host: api.capsolver.com
Content-Type: application/json
{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "HCaptchaClassification",
"websiteURL": "https://xxxx.com",
"question": "Please click each image containing a chair",
// "question": "duck$penguin$shark$elephant",
// "question": "please click on the panda",
"queries": [
"/9j/4AAQS.....",
"/9j/4AAQ1.....",
"/9j/4AAQ2.....",
"/9j/4AAQ3.....",
"/9j/4AAQ4....."
]
}
}
Example Response
{
"errorId": 0,
"errorCode": "",
"status": "ready",
"solution": {
// Please click each response
"objects": [
true,
false,
false,
true,
true,
false,
true,
true
],
// Please draw a box response
"box": [
//x1
198.2198,
//y1
629.8307,
//x2
851.69403,
//y2
817.2047
],
"tags": [
"duck",
"penguin",
"shark",
"elephant",
],
"imageSize": [
//height,width
1072,
1000
]
},
"taskId": "5aa8be0c-94a5-11ec-80d7-00163f00a53c"
}
Use SDK Request
# pip install --upgrade capsolver
# export CAPSOLVER_API_KEY='...'
import capsolver
# capsolver.api_key = "..."
img_path = os.path.join(Path(__file__).resolve().parent, "chair.jpg")
with open(img_path, 'rb') as f:
solution = capsolver.solve({
"type": "HCaptchaClassification",
"question": "Please click each image containing a chair",
"queries": [
"/9j/4AAQS.....",
"/9j/4AAQ1.....",
"/9j/4AAQ2.....",
"/9j/4AAQ3.....",
"/9j/4AAQ4.....",
]
})
print(solution)
package main
import (
"fmt"
capsolver_go "github.com/capsolver/capsolver-go"
"log"
)
func main() {
// first you need to install sdk
//go get github.com/capsolver/capsolver-go
//export CAPSOLVER_API_KEY='...' or
//capSolver := CapSolver{ApiKey:"..."}
capSolver := capsolver_go.CapSolver{}
solution, err := capSolver.Solve(map[string]any{
"type": "HCaptchaClassification",
"question": "Please click each image containing a truck",
"queries": []string{
"/9j/4AAQS.....",
"/9j/4AAQ1.....",
"/9j/4AAQ2.....",
"/9j/4AAQ3.....",
"/9j/4AAQ4.....",
},
})
if err != nil {
log.Fatal(err)
return
}
fmt.Println(solution)
}
Classification Support
Query interface, directly submit the whole sentence of the problem, if you encounter a new category, please contact customer service to add.
Because the HCaptcha is updated so frequently, the document no longer lists all the categories, and you just upload the questions you get from the web page.
If it is a new category, we will support it within 3 working days
If it's an existing category and it's just a different way of asking the question, we'll update it every day.