# Classification API

# Captioning API

Caption api returns the picture type, room label and objects in the scene.

curl https://image.odaportal.com/api/v1/generate-caption \
    -H "Content-Type: application/json" 
    -H "Authorization: Bearer ODA_STUDIO_AUTHENTICATION_TOKEN" 
    -d '{"url":URL_OF_YOUR_IMAGE}'

ODA_STUDIO_AUTHENTICATION_TOKEN → API TOKEN that Oda will provide.

URL_OF_YOUR_IMAGE → URL of the image on your hosted server (e.g. AWS S3 url).

# Returns

{
    "caption": "kitchen, detected: microwave, oven",
    "seo_caption": "kitchen-with-microwave-oven",
    "room_label": "kitchen"
}

# Room Type Classification

Room Type Classification api returns the room type of a given real estate image. Current room categories are:

building_front, exterior, bathroom, bedroom, closet, corridor, 
dining_room, garage, gym , kitchen, living_room, exterior, 
pool, utility_room, fenced_yard
curl https://image.odaportal.com/api/v1/classify-room-type \
    -H "Content-Type: application/json" 
    -H "Authorization: Bearer ODA_STUDIO_AUTHENTICATION_TOKEN" 
    -d '{"url":URL_OF_YOUR_IMAGE}'

ODA_STUDIO_AUTHENTICATION_TOKEN → API TOKEN that Oda will provide.

URL_OF_YOUR_IMAGE → URL of the image on your hosted server (e.g. AWS S3 url).