AWS WAF Images Recognize
WARNING
Create the task with the createTask
This interface does not need to obtain the results separately, will directly return the image recognition results!
The task type field is as follows
AwsWafClassification
Create Task
Create the task with the createTask
Task Object Structure
| Properties | Type | Required | Description |
|---|---|---|---|
| type | String | Required | AwsWafClassification |
| websiteURL | String | Optional | Page source url to improve accuracy |
| images | List[string] | Required | base64 image string, aws:grid supports 9 images each time, other types support 1 image each time |
| question | String | Required | For full names of questions, please refer to the following list of questions. |
Question allow list
aws:toycarcity:carcity //Place a dot at the end of the car's path
aws:grid:bag
aws:grid:bed
aws:grid:belts
aws:grid:binocular
aws:grid:bucket
aws:grid:chair
aws:grid:clock
aws:grid:cooking pot
aws:grid:curtain
aws:grid:fork
aws:grid:hat
aws:grid:scissors
aws:grid:seat
aws:grid:spoon
aws:grid:suitcase
aws:grid:umbrellaSupport Types
The questions with the supported image types are as follows:
| Types | Support |
|---|---|
![]() | Yes |
![]() | NO |
![]() | Yes |
Example Request
POST https://api.capsolver.com/createTask
Host: api.capsolver.com
Content-Type: application/json{
"clientKey": "YOUR_API_KEY",
"task": {
"type": "AwsWafClassification",
"websiteURL": "https://xxxx.com",
"images": [
"/9j/4AAQSkZJRgABAgAA..."
],
"question": "aws:toycarcity:carcity"
}
}Example Response
{
"errorId": 0,
"status": "ready",
"solution": {
//carcity point
"box": [
116.7,
164.1
],
// grid type, objects means the image index that matches the question
"objects": [0, 1, 3, 4, 6],
//if question include `bifurcatedzoo`
"distance": 500
},
"taskId": "cbb1c730-e569-4ba6-b5fc-e06377694aa7"
}Use SDK Request
#pip install --upgrade capsolver
#export CAPSOLVER_API_KEY='...'
import capsolver
capsolver.api_key = "..."
solution = capsolver.solve({
"type":"AwsWafClassification",
"question":"aws:toycarcity:carcity",
"images" : [
"/9j/2wCEAAoHBwgH...",
]
})
print(solution)

