{"openapi":"3.0.1","info":{"title":"CPSign Regression Prediction Service","description":"Service that deploys a CPSign regression model and allows for predictions to be made by the deployed model. The service also comes bundled with an interactive drawing interface that can be accessed using <service-url>/draw where molecules can be drawn and predicted interactively.","contact":{"name":"Aros Bio","url":"https://www.arosbio.com/","email":"ola@arosbio.com"},"license":{"name":"© Aros Bio - All rights reserved"},"version":"2.0.0"},"paths":{"/api/v2/health":{"get":{"tags":["Server info"],"summary":"Get the status of the prediction service","operationId":"health","responses":{"200":{"description":"Service is running","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ServiceRunning"}}}},"503":{"description":"Service down","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/modelInfo":{"get":{"tags":["Server info"],"summary":"Get information about this model","operationId":"modelInfo","responses":{"200":{"description":"Model info","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelInfo"}}}},"503":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/predict":{"get":{"tags":["Predict"],"summary":"Make a prediction on a given molecule","description":"Predict a given molecule in SMILES or MDL v2000/v3000 format. In case a MDL is sent, it must be properly URL-encoded in UTF-8. You can use for instance https://www.urlencoder.org/ to encode your file.","operationId":"predictGet","parameters":[{"name":"molecule","in":"query","description":"Compound structure notation using SMILES or MDL format","required":true,"schema":{"type":"string"},"example":"CCCCC=O"},{"name":"confidence","in":"query","description":"The desired confidence of the prediction","schema":{"maximum":1.0,"minimum":0.0,"type":"number","format":"double"},"example":0.8}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegressionResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"500":{"description":"Prediction error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Predict"],"summary":"Make a prediction on a given molecule","description":"Predict a given molecule in SMILES or MDL v2000/v3000 format","operationId":"predictPost","parameters":[{"name":"confidence","in":"query","description":"The desired confidence of the prediction","schema":{"maximum":1.0,"minimum":0.0,"type":"number","format":"double"},"example":0.8}],"requestBody":{"description":"Molecule in SMILES or MDL format","content":{"text/plain":{"schema":{"type":"string"},"example":"CCCCC=O"}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegressionResult"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"500":{"description":"Prediction error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}},"/api/v2/predictImage":{"get":{"tags":["Predict"],"summary":"Make a prediction image for the given molecule","description":"Predict a given molecule to get a prediction image, accepts SMILES or MDL v2000/v3000 format. In case a MDL is sent, it must be properly URL-encoded in UTF-8. You can use for instance https://www.urlencoder.org/ to encode your file.","operationId":"predictImageGet","parameters":[{"name":"molecule","in":"query","description":"Compound structure notation using SMILES or MDL format","schema":{"type":"string"},"example":"CCCCC=O"},{"name":"confidence","in":"query","description":"The desired confidence of the prediction","schema":{"maximum":1.0,"minimum":0.0,"type":"number","format":"double"},"example":0.8},{"name":"imageWidth","in":"query","description":"Image width in pixels","schema":{"maximum":5000,"minimum":100,"type":"integer","format":"int32","default":600}},{"name":"imageHeight","in":"query","description":"Image height in pixels","schema":{"maximum":5000,"minimum":100,"type":"integer","format":"int32","default":600}},{"name":"addPrediction","in":"query","description":"Add the prediction (i.e. prediction interval, corresponding to set confidence) in the image","schema":{"type":"boolean","default":false}},{"name":"addLegend","in":"query","description":"Add legend (i.e. the color gradient used)","schema":{"type":"boolean","default":true}},{"name":"addTitle","in":"query","description":"Add title to the image (the model name)","schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"OK","content":{"image/png":{}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"500":{"description":"Prediction error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}},"post":{"tags":["Predict"],"summary":"Make a prediction image for the given molecule","description":"Predict a given molecule to get a prediction image, accepts SMILES or MDL v2000/v3000 format.","operationId":"predictImagePost","parameters":[{"name":"confidence","in":"query","description":"The desired confidence of the prediction","schema":{"maximum":1.0,"minimum":0.0,"type":"number","format":"double"},"example":0.8},{"name":"imageWidth","in":"query","description":"Image width in pixels","schema":{"maximum":5000,"minimum":100,"type":"integer","format":"int32","default":600}},{"name":"imageHeight","in":"query","description":"Image height in pixels","schema":{"maximum":5000,"minimum":100,"type":"integer","format":"int32","default":600}},{"name":"addPrediction","in":"query","description":"Add the prediction (i.e. prediction interval, corresponding to set confidence) in the image","schema":{"type":"boolean","default":false}},{"name":"addLegend","in":"query","description":"Add legend (i.e. the color gradient used)","schema":{"type":"boolean","default":true}},{"name":"addTitle","in":"query","description":"Add title to the image (the model name)","schema":{"type":"boolean","default":false}}],"requestBody":{"description":"Molecule to predict in SMILES or MDL format","content":{"text/plain":{"schema":{"type":"string"},"example":"CCCCC=O"}}},"responses":{"200":{"description":"OK","content":{"image/png":{}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BadRequestError"}}}},"500":{"description":"Prediction error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}},"503":{"description":"Service not available","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorResponse"}}}}}}}},"components":{"schemas":{"ServiceRunning":{"type":"object","properties":{"message":{"type":"string"}}},"ErrorResponse":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"}}},"ModelInfo":{"required":["modelName","version"],"type":"object","properties":{"modelName":{"type":"string"},"version":{"type":"string"},"category":{"type":"string"}}},"RegressionResult":{"required":["modelName","predictionMidpoint","smiles"],"type":"object","properties":{"smiles":{"type":"string"},"lower":{"type":"number","format":"double"},"upper":{"type":"number","format":"double"},"predictionMidpoint":{"type":"number","format":"double"},"confidence":{"type":"number","format":"double"},"modelName":{"type":"string"}}},"BadRequestError":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"string"}}}}}}}