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.
objects
optional
boolean
A flag requesting object detection.
Response
200: OK
Image successfully classified.
{
"hash": "deadbeefcafebabe",
"height": 1366,
"width": 2048,
"remaining": 999,
"requests": 1,
"classifier": [
{
name: "Living Room",
confidence: 0.9996274709701538,
rank: 1
},
{
name: "Outdoor",
confidence: 0.7036548946876468,
rank: 2
}
],
"detections": [
{
"area": 122933,
"boundingBox": "[14,657,478,1079]",
"mask": "stairs",
"confidence": 0.4213932454586029
}
]
}
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,
"objects": false
}

Possible classifications

Aerial

Indoor

Outdoor

Bathroom

Bedroom

Community

Corridor

Diagram

Dining room

Front of house

Garage

Kitchen

Laundry room

Living room

Office

Unrelated

Utility room

Walk in closet/pantry

Possible object detections

Kitchen
Furniture
Animals
Other
Misc.
Kitchen

Bottle

Wine Glass

Cup

Fork

Knife

Spoon

Bowl

Sandwich

Orange

Carrot

Hot Dog

Pizza

Cake

Furniture

Chair

Couch

Potted plant

Bed

Dining table

Furniture-other

Toilet

TV

Laptop

Mouse

Remote

Keyboard

Cell phone

Microwave

Oven

Toaster

Sink

Refrigerator

Animals

Bird

Cat

Dog

Horse

Sheep

Cow

Elephant

Bear

Zebra

Other

Book

Flower

Rug

Clock

Fog

Sand

Vase

Food-Other

Sea

Blanket

Fruit

Shelf

Branch

Grass

Sky-other

Bridge

Gravel

Snow

Building-other

Ground-other

Solid-other

Bush

Hill

Stairs

Cabinet

House

Stone

Cage

Leaves

Straw

Cardboard

Light

Structural-other

Ceiling-other

Metal

Table

Tent

Ceiling-tile

Mirror-stuff

Textile-other

Cloth

Mountain

Towel

Clothes

Mud

Tree

Clouds

Napkin

Wall-brick

Counter

Net

Wall-concrete

Cupboard

Paper

Wall-other

Curtain

Pavement

Wall-panel

Desk-stuff

Pillow

Wall-stone

Dirt

Plant-other

Wall-tile

Door-stuff

Playing-field

Wall-wood

Fence

Railing

Water-other

Floor-marble

Railroad

Waterdrops

Floor-other

River

Window-blind

Floor-stone

Road

Window-other

Floor-tile

Rock

Floor-wood

Roof

Misc.

Person

Bicycle

Car

Motorcycle

Bus

Truck

Boat

Fire Hydrant

Bench

Snowboard

Ball

Baseball Bat

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"
}