스타일 추출 샘플예제

스타일 분석 추가

  • REQUEST (CURL / GET)

curl --request GET \
     --url https://apis.openapi.sk.com/urbanbase/v1/space/analyzer \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'appKey: My Project의 Project Key'
  • REQUEST (CURL / POST)

curl --request POST \
     --url https://apis.openapi.sk.com/urbanbase/v1/space/analyzer \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'appKey: My Project의 Project Key'
  • REQUEST (SAMPLE CODE)

POST /space/analyzer

headers: {
    "Content-Type": "application/json",
    “appkey”: “{appkey}”   
}
body: {
    "image_path": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Wohnzimmer_2007.jpg/220px-Wohnzimmer_2007.jpg"
}
  • RESPONSE (200 / JSON)

{
  "code": "00000",
  "message": "success",
  "data": {
    "space_image_uuid": "91541ce9-6c62-49ce-a5a7-c2f86c93c8cd",
    "image_path": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Wohnzimmer_2007.jpg/220px-Wohnzimmer_2007.jpg",
    "created_date": "2021-01-11T01:16:15.139Z",
    "results": [
      {
        "label": "natural",
        "probability": 0.8820837140083313,
        "description": "The style that seeks to warm sensibility and static space based on a natural feeling."
      },
      {
        "label": "nordic",
        "probability": 0.08346893638372421,
        "description": "The comfortable and cozy style that gives a point to the smooth pastel tones."
      }
    ]
  }
}
  • RESPONSE (400/ JSON)

{
  "code": "12001",
  "message": "Invalid image_path"
}
  • RESPONSE (PARAMETERS)

Name

Type

Mandatory

Example

Description

code

Number

Y

응답 상태 코드

message

String

Y

응답 상태 설명

data

object

Y

데이터 정보

space_image_uuid

String

Y

범용 고유 식별자(UUID)

image_path

String

Y

이미지 경로

created_date

Date

Y

스타일 분석 데이터 생성 시간

results

Ojbect

Y

스타일 분석 결과

label

String

N

분석 결과 레이블

probability

Number

N

분석 결과 확률 (0 ~ 1)

description

Number

N

분석 결과에 대한 추가적인 설명



스타일 분석 조회

  • REQUEST (CURL / GET)

curl --request GET \
     --url https://apis.openapi.sk.com/urbanbase/v1/space/analyzer/space_image_uuid \
     --header 'Accept: application/json' \
     --header 'appKey: My Project의 Project Key'
  • REQUEST (CURL / POST)

curl --request POST \
     --url https://apis.openapi.sk.com/urbanbase/v1/space/analyzer/space_image_uuid \
     --header 'Accept: application/json' \
     --header 'appKey: My Project의 Project Key'
  • REQUEST (SAMPLE CODE)

GET /space/analyzer/91541ce9-6c62-49ce-a5a7-c2f86c93c8cd

headers: {
    "Content-Type": "application/json",
    “appkey”: “{appkey}”   
}
  • RESPONSE (200 / JSON)

{
  "code": "00000",
  "message": "success",
  "data": {
    "space_image_uuid": "91541ce9-6c62-49ce-a5a7-c2f86c93c8cd",
    "image_path": "https://upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Wohnzimmer_2007.jpg/220px-Wohnzimmer_2007.jpg",
    "created_date": "2021-01-11T01:16:15.139Z",
    "results": [
      {
        "label": "natural",
        "probability": 0.8820837140083313,
        "description": "The style that seeks to warm sensibility and static space based on a natural feeling."
      },
      {
        "label": "nordic",
        "probability": 0.08346893638372421,
        "description": "The comfortable and cozy style that gives a point to the smooth pastel tones."
      }
    ]
  }
}
  • RESPONSE (400/ JSON)

{
  "code": "40000",
  "message": "Not Found"
}
  • RESPONSE (PARAMETERS)

Name

Type

Mandatory

Example

Description

code

Number

Y

응답 상태 코드

message

String

Y

응답 상태 설명

data

Object

Y

데이터 정보

space_image_uuid

String

Y

범용 고유 식별자(UUID)

image_path

String

Y

이미지 경로

created_date

Date

Y

스타일 분석 데이터 생성 시간

label

String

Y

분석 결과 레이블

probability

Number

N

분석 결과 확률 (0 ~ 1)

description

String

N

분석 결과에 대한 추가적인 설명