{"openapi":"3.0.2","info":{"title":"NSFW image detector iCoSys service","description":"API to detect not-safe-for-work (NSFW) images","version":"2.1","x-logo":{"url":"assets/icosys-logo.png"}},"paths":{"/":{"get":{"summary":"Info","operationId":"info__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/categories":{"get":{"summary":"Get Categories","operationId":"get_categories_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryInfo"}}}}}}},"/file":{"post":{"summary":"Predict From File","operationId":"predict_from_file_file_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_predict_from_file_file_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassificationResults"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/url":{"post":{"summary":"Predict From Url Bis","operationId":"predict_from_url_bis_url_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/URLToPredict"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassificationResults"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/b64":{"post":{"summary":"Predict From B64","operationId":"predict_from_b64_b64_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Base64ToPredict"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClassificationResults"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/showcase":{"get":{"summary":"Showcase","description":"Showcase website demonstrating the functionalities of the microservice.\n:return: HTML","operationId":"showcase_showcase_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/assets/{filename}":{"get":{"summary":"Assets","operationId":"assets_assets__filename__get","parameters":[{"required":true,"schema":{"title":"Filename","type":"string"},"name":"filename","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Base64ToPredict":{"title":"Base64ToPredict","required":["base64"],"type":"object","properties":{"base64":{"title":"Base64","type":"string"}}},"Body_predict_from_file_file_post":{"title":"Body_predict_from_file_file_post","required":["file"],"type":"object","properties":{"file":{"title":"File","type":"string","format":"binary"}}},"CategoryInfo":{"title":"CategoryInfo","type":"object","properties":{"categories":{"title":"Categories","type":"array","items":{"type":"string"},"default":["nsfw","safe"]},"sub_categories":{"title":"Sub Categories","type":"array","items":{"type":"string"},"default":["nsfw_cartoon","nsfw_nudity","nsfw_porn","nsfw_suggestive","safe_cartoon","safe_general","safe_person"]}}},"ClassificationResults":{"title":"ClassificationResults","required":["prediction_cat","prediction_sub_cat","sub_cat_scores","cat_scores"],"type":"object","properties":{"image_info":{"$ref":"#/components/schemas/ImageInfo"},"prediction_cat":{"title":"Prediction Cat","type":"string"},"prediction_sub_cat":{"title":"Prediction Sub Cat","type":"string"},"sub_cat_scores":{"title":"Sub Cat Scores","type":"array","items":{"$ref":"#/components/schemas/Score"}},"cat_scores":{"title":"Cat Scores","type":"array","items":{"$ref":"#/components/schemas/Score"}}}},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ImageInfo":{"title":"ImageInfo","type":"object","properties":{"filename":{"title":"Filename","type":"string"},"img_type":{"title":"Img Type","type":"string"},"img_dim_x":{"title":"Img Dim X","type":"integer"},"img_dim_y":{"title":"Img Dim Y","type":"integer"}}},"Score":{"title":"Score","required":["category_name","score"],"type":"object","properties":{"category_name":{"title":"Category Name","type":"string"},"score":{"title":"Score","type":"number"}}},"URLToPredict":{"title":"URLToPredict","required":["url"],"type":"object","properties":{"url":{"title":"Url","maxLength":65536,"minLength":1,"type":"string","format":"uri"}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}},"servers":[{"url":"https://icoservices.kube.isc.heia-fr.ch//nsfw-image-detector","description":"iCoSys NSFW image detector"}]}