Model

Predict

Used to send prediction request and get result-id as response.

POST URL:{{base_url}}/api/{{version}}/model/:id/predict

Path Parameters

NameTypeDescription

id*

String

Model id of a particular ml model.

Headers

NameTypeDescription

Authorization*

API key

Content-Type*

application/json

Request Body

NameTypeDescription

file

multipart/form-data

File with extensions png , jpeg and pdf. This field is used to send file for getting prediction from ml models.

version*

multipart/form-data

Used to specify the version of ml model, using which we need to get the prediction.

To get prediction using latest version of the model without specifying the correct version , give version value as 0.0. Then the api will use latest available version of the model to get prediction.

splitDocument*

multipart/form-data

It can be "true" or "false". But currently "true" value is only available for some ml models. If the chosen model could not support "true", api will send bad request response. "true" value can give more accurate result if the give pdf file contains more than one page. Please use "true" value in the case of invoice model to increase accuracy.

text

multipart/form-data

Used to get prediction from NER type ml models.

{
    "data": {
        "result_id": "String"
    },
    "message": "String",
    "status": 200
}

Used to get result of a particular prediction using result id.

GET URL:{{base_url}}/api/{{version}}/model/result/:id

Path Parameters

NameTypeDescription

id *

String

Result id of a particular prediction.

Headers

NameTypeDescription

Authorization*

API key

Content-Type*

application/json

{
    "data": {
        "message":"String",
        "status":"SUCCESS",
        "result":{}
    },
    "message": "String",
    "status": 200
}

Model

Used to list available models.

GET URL:{{base_url}}/api/{{version}}/model/view

Headers

NameTypeDescription

Authorization*

API key

Content-Type*

application/json

{
    "data": {
        "models":[]     
    },
    "message": "String",
    "status": 200
}

Used to get model details.

GET URL:{{base_url}}/api/{{version}}/model/:id/view

Path Parameters

NameTypeDescription

id*

String

Model id of a particular ml model.

Headers

NameTypeDescription

Authorization*

API key

Content-Type*

application/json

{
    "data": {
        "model_details":{}   
    },
    "message": "String",
    "status": 200
}

Used to get version details of particular model.

GET URL:{{base_url}}/api/{{version}}/model/:id/:version/info

Path Parameters

NameTypeDescription

id*

String

Model id of a particular ml model.

version*

Float

Version of a particular ml model.

Headers

NameTypeDescription

Authorization*

API key

Content-Type*

application/json

{
    "data": {
        "info": {}
    },
    "message": "successfully retrieved details",
    "status": 200
}

Used to delete latest model version.

DELETE URL:{{base_url}}/api/{{version}}/model/:id/delete

Path Parameters

NameTypeDescription

id *

String

Model id of a particular ml model.

Headers

NameTypeDescription

Authorization*

API key

Content-Type*

application/json

{
    "data": {},
    "message": "deleted successfully",
    "status": 200
}

You cannot delete PRETRIAINED models using Delete API

Last updated