Classification

post
Classify a single image

https://api.foyer.ai/images/classify
This endpoint runs your image through classification and object detection. Accepts a single image with the parameters below, or an array of images.
Request
Response
Request
Headers
Authorization
required
string
Authorization token.
Body Parameters
url
optional
string
A URL to an image.
file
optional
string
An image as a base64 encoded string.
force
optional
boolean
A flag requesting a force relabeling.
Response
200: OK
Image successfully classified. All decimals are percents. Indoor and outdoor classifications will always be ranked last, regardless of confidence.
{
"hash": "deadbeefcafebabe",
"height": 1366,
"width": 2048,
"remaining": 999,
"requests": 1,
"classifications": [
{
"name": "living_room",
"confidence": 0.9996274709701538,
"rank": 1
},
{
"name": "outdoor",
"confidence": 0.7036548946876468,
"rank": 2
}
],
"detections": [
{
"class": "floor",
"area": 0.1321029663085938,
"boundingBox": [
0,
0.091796875,
0.998046875,
0.896484375
],
"confidence": 0.4213932454586029,
"attributes": [
{
"name": "floor_type",
"value": "hardwood",
"confidence": 0.923857
}
]
}
],
"metadata": {
"md5": "6897fa4c4cb0cc682ac75d90f83eafb5",
"width": 1937,
"height": 2583
}
}
401: Unauthorized
Invalid authentication token.
{
"statusCode": 401,
"error": "Unauthorized",
"message": "Invalid credentials",
"attributes": {
"error": "Invalid credentials"
}
}
403: Forbidden
No associated account found.
<Response body is empty>

Either the file or url body parameters must be specified, but not both.

Example request body

{
"url": "https://upload.wikimedia.org/wikipedia/commons/6/6d/Down_House.jpg",
"force": true
}

Possible classifications

aerial_view

indoor

outdoor

bathroom

bedroom

community

gym

diagram

dining_room

front_of_structure

garage

kitchen

laundry

living_room

office

other

pool

closet

Possible object detections

Features
Furniture
Items
Outdoor
Features

fireplace

stairway

floor

ceiling

window

wall

stairs

cabinet

sink

counter

closet

toilet

kitchen_island

bar

countertop

bannister

booth

chandelier

shelf

stove

railing

refrigerator

column

bathtub

blind

escalator

door

fountain

stage

buffet_counter

conveyor

canopy

washing_machine

swimming_pool

oven

step

tank

microwave

dishwasher

hood

sconce

shower

radiator

Furniture

table

curtain

chair

bench

couch

chest

mirror

rug

armchair

seat

desk

stand

coffee_table

pool_table

grandstand

display_case

pillow

bookcase

ottoman

swivel_chair

stool

cradle

trashcan

bulletin

bed

Items

poster

painting

lamp

computer

cushion

box

sign

screen

book

toy

arcade_machine

towel

television

apparel

light

pole

bottle

basket

ball

barrel

bag

food

pot

projection_screen

vase

sculpture

blanket

tray

fan

crt

plate

monitor

drinking_glass

clock

flag

Outdoor

sky

tree

road

building

grass

sidewalk

ground

mountain

plant

car

water

house

sea

field

fence

stone

sand

skyscraper

path

runway

river

bridge

flower

hill

palm

boat

hut

truck

tower

bus

awning

streetlight

airplane

dirt_track

land

van

tent

waterfall

ship

motorbike

bicycle

lake

traffic_light

pier

A floor segmentation will automatically have a flooring type within its attributes.

carpet

stone

marble

hardwood

tile

other

post
Classify images from a RESO object

https://api.foyer.ai/images/classifyReso
This endpoint runs multiple images through classification and object detection from a valid RESO payload.
Request
Response
Request
Headers
Authorization
required
string
Authorization token.
Body Parameters
value
required
array
A single RESO object or an array of multiple. Objects must contain a Media Resource as defined by the RESO standard.
Response
200: OK
Images successfully classified. Classifier information will be added to the ImageOf field of each Media Resource.
{
"@odata.context": "http://odata.listhub.moveaws.com/odata/$metadata#Property",
"value": [
{
"@odata.id": "http://odata.listhub.moveaws.com/odata/Property('3yd-A2SELL-281884')",
"ListingKey": "3yd-A2SELL-281884",
"ListingId": "281884",
"PropertyType": "Land",
"PropertySubType": "Other",
"ListPrice": 21900,
...
"Media": [
{
"MediaCategory": "Photo",
"MediaURL": "http://photos.listhub.net/A2SELL/281884/1",
"MediaKey": "2483763c0011d2a36483fb3f28ca8c00564abb4d",
"MediaModificationTimestamp": "2019-10-03T09:14:00.000Z",
"ImageOf": [
"Diagram"
]
},
{
"MediaCategory": "Photo",
"MediaURL": "http://photos.listhub.net/A2SELL/281884/2",
"MediaKey": "192607ff01a04478df871a6146b5e44e9683deb2",
"MediaModificationTimestamp": "2019-10-03T09:14:00.000Z",
"ImageOf": [
"Outdoor"
]
},
{
"MediaCategory": "Photo",
"MediaURL": "http://photos.listhub.net/A2SELL/281884/3",
"MediaKey": "748444298599641bba9ae7278f777759779afe9f",
"MediaModificationTimestamp": "2019-10-03T09:14:00.000Z",
"ImageOf": [
"Outdoor"
]
},
{
"MediaCategory": "Photo",
"MediaURL": "http://photos.listhub.net/A2SELL/281884/4",
"MediaKey": "a763fdf6f243a9ade93a3695af5eaf2c7233829a",
"MediaModificationTimestamp": "2019-10-03T09:14:00.000Z",
"ImageOf": [
"Outdoor"
]
},
{
"MediaCategory": "Photo",
"MediaURL": "http://photos.listhub.net/A2SELL/281884/5",
"MediaKey": "7d2531b1ddc50deb7c256c2c67c88a399a5b9b68",
"MediaModificationTimestamp": "2019-10-03T09:14:00.000Z",
"ImageOf": [
"Outdoor"
]
},
{
"MediaCategory": "Photo",
"MediaURL": "http://photos.listhub.net/A2SELL/281884/6",
"MediaKey": "19683d3d369aaade3551c0c192b5c186de2c563b",
"MediaModificationTimestamp": "2019-10-03T09:14:00.000Z",
"ImageOf": [
"Outdoor"
]
},
{
"MediaCategory": "Photo",
"MediaURL": "http://photos.listhub.net/A2SELL/281884/7",
"MediaKey": "4652e1f0e0a5400747b4f5f8f1eaa74d65edf943",
"MediaModificationTimestamp": "2019-10-03T09:14:00.000Z",
"ImageOf": [
"Outdoor"
]
},
{
"MediaCategory": "Photo",
"MediaURL": "http://photos.listhub.net/A2SELL/281884/8",
"MediaKey": "cd4a82af4d64d5549031b1cbfbeee24a0103c00a",
"MediaModificationTimestamp": "2019-10-03T09:14:00.000Z",
"ImageOf": [
"Outdoor"
]
}
]
}
],
"@odata.nextLink": "https://odata.listhub.moveaws.com/odata/Property?%24top=1&%24skiptoken=3yd-A2SELL-281884"
}
401: Unauthorized
Invalid authentication token.
{
"statusCode": 401,
"error": "Unauthorized",
"message": "Invalid credentials",
"attributes": {
"error": "Invalid credentials"
}
}
403: Forbidden
No associated account found.
<Response body is empty>

See the RESO definition for a Media Resource. We require the MediaURL field to be defined for image classification.

Example request body

{
"@odata.context": "http://odata.listhub.moveaws.com/odata/$metadata#Property",
"value": [
{
"@odata.id": "http://odata.listhub.moveaws.com/odata/Property('3yd-A2SELL-281884')",
"ListingKey": "3yd-A2SELL-281884",
"ListingId": "281884",
"PropertyType": "Land",
"PropertySubType": "Other",
"ListPrice": 21900,
...
"Media": [
{
"MediaCategory": "Photo",
"MediaURL": "http://photos.listhub.net/A2SELL/281884/1", // required
"MediaKey": "2483763c0011d2a36483fb3f28ca8c00564abb4d",
"MediaModificationTimestamp": "2019-10-03T09:14:00.000Z"
},
...
]
}
],
"@odata.nextLink": "https://odata.listhub.moveaws.com/odata/Property?%24top=1&%24skiptoken=3yd-A2SELL-281884"
}