Skip to content
On this page
Home
>Task(Recognition)
>AwsWafClassification

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

PropertiesTypeRequiredDescription
typeStringRequiredAwsWafClassification
websiteURLStringOptionalPage source url to improve accuracy
imagesList[string]Requiredbase64 image string, aws:grid supports 9 images each time, other types support 1 image each time
questionStringRequiredFor full names of questions, please refer to the following list of questions.

Question allow list

txt
aws:toycarcity:carcity  //Place a dot at the end of the car's path 
aws:grid:bed            // Choose all the beds
aws:grid:bag
aws:grid:hat
aws:grid:chair
aws:grid:bucket
aws:grid:curtain
aws:grid:mop
aws:grid:clock

Support Types

The questions with the supported image types are as follows:

TypesSupport
img_11.pngYes
img_12.pngNO
img_13.pngYes

Example Request

txt
POST https://api.capsolver.com/createTask
Host: api.capsolver.com
Content-Type: application/json
json
{
 "clientKey": "YOUR_API_KEY",
 "task": {
   "type": "AwsWafClassification",
   "websiteURL": "https://xxxx.com",
   "images": [
     "/9j/4AAQSkZJRgABAgAA..."
   ],
   "question": "aws:toycarcity:carcity"
 }
}

Example Response

json
{
 "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

python
#pip install --upgrade capsolver
#export CAPSOLVER_API_KEY='...'

import capsolver
# capsolver.api_key = "..."
img_path = os.path.join(Path(__file__).resolve().parent,"queue-it.jpg")
with open(img_path,'rb') as f:
    solution = capsolver.solve({
        "type":"AwsWafClassification",
        "question":"aws:toycarcity:carcity",
        "images" : [
             "/9j/2wCEAAoHBwgH...",
        ]
    })
    print(solution)
go
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":     "AwsWafClassification",
		"question": "aws:toycarcity:carcity",
		"images": []string{
			"/9j/2wCEAAoHBwgH...",
		},
	})
	if err != nil {
		log.Fatal(err)
		return
	}
	fmt.Println(solution)
}