Visual QA v3
Changed onAnalyze an image and return the results of the requested features (see the features enum).
The mainGarmentColor and mainGarmentCategory features classify the main garment against a taxonomy you supply per request, in colorTaxonomy and categoryTaxonomy respectively. Each feature and its taxonomy must be sent together — one without the other is a 400. Both classifications ride on the same model call as clothingItemDetection, so asking for any combination of the three costs a single call.
Requires an Enterprise plan: requests authenticated with a non-Enterprise API key receive a 403 with a link to contact our sales team.
post/v3/visual-qa
Request
- Base URLhttps://image-api.photoroom.com
- URLhttps://image-api.photoroom.com/v3/visual-qa
- AuthAPI key in header x-api-key
Request body multipart/form-data
Example request
{
"imageUrl": "https://example.com/image.jpg",
"referenceImageUrl": "https://example.com/reference.jpg",
"colorTaxonomy": "[{\"code\":\"COLOR-027\",\"name\":\"Navy\",\"hex\":\"#002062\"}]",
"categoryTaxonomy": "[{\"code\":\"TOPS\",\"name\":\"Tops\"},{\"code\":\"TEE\",\"name\":\"T-Shirts\",\"parentCode\":\"TOPS\"}]"
}Response
OK
Example response
{
"caption": "Three gold rings with blue stones on a marble surface.",
"mainGarment": {
"description": "rust blouse"
},
"mainGarmentColor": {
"code": "COLOR-042",
"name": "Brick",
"hex": "#AF4942"
}
}Changes
- info
endpoint added
- info