openapi: 3.0.0 info: title: Flip-ML API description: API allowing to detect the orientation on an image. contact: name: Gauthier Abel email: abelgauthier@hotmail.com license: name: iCoSys License url: www.icosys.ch version: 1.0.0 servers: - url: https://icoservices.k8s.tic.heia-fr.ch/flip-ml description: iCosSys Flip-ML server paths: /predict/url: post: summary: Predict image orientation from URL description: Predict the orientation of an image from an URL requestBody: required: true content: multipart/form-data: schema: type: object properties: url: type: string example: https://document.jpg description: URL image whose orientation has to be predicted. responses: 200: $ref: '#/components/responses/Success' /detections/b64: post: summary: Predict image orientation from base64 description: Predict the orientation of a base64-encoded image. requestBody: required: true content: multipart/form-data: schema: type: object properties: base64: type: string format: byte example: /9j/4QLmRXhpZgAATU0AK... description: Base64 encoded image whose orientation has to be predicted. responses: 200: $ref: '#/components/responses/Success' /detections/file: post: summary: Predict image orientation from file description: Predict the orientation of an image from a file. requestBody: required: true content: multipart/form-data: schema: type: object properties: image: type: string format: binary example: document.jpg responses: 200: $ref: '#/components/responses/Success' components: schemas: PredictionsResults0: type: object properties: dry: type: number description: Confidence of the 0° class example: 0.9998887 description: The resulting confidence in the 0° class PredictionsResults180: type: object properties: snow: type: number description: Confidence of the 180° class example: 4.85434012865299e-13 description: The resulting confidence in the 180° class responses: Success: description: The request successfully predicted the orientation of the image content: application/json: schema: type: object properties: predicted_class: type: string description: String containing the name of the predicted class example: 0° format: string predictions: type: array description: List of classes and their respective prediction probabitlity in the given image items: oneOf: - $ref: '#/components/schemas/PredictionsResults0' - $ref: '#/components/schemas/PredictionsResults180' minItems: 2 maxItems: 2 description: Result of an image class prediction query