Model API
Description of Model API parameters
Overview of Model API which allows you to interact with your models. If this is your first time using a REST API, refer to the First Time User guide.
POST https://api.corsali.com/predict/model_id
This endpoint allows you to make inference calls to your model. Which model you are interacting with is defined by the model id in the URL.
Query Parameters
JSON containing the data that
is fed into the model.
Type of content such as "application/json"
"Bearer: <Authentication Key>"
x-corsali-organization-id
{"data": "model specific return data", "warning": "If a warning occured"}
{"error": "specific error information"}
Request Parameters
The content type will be "application/json" unless specified otherwise for your specific model. This information can be found 👉 here.
Type: string
Example: "application/json"
The authorization header is in the format "Bearer: <Authentication Key>". For more information on authentication keys see 👉 here.
Type: string
Example: "Bearer: eyJxxx.eyJxxx.1ANxxx"
x-corsali-organization-id
The x-corsali-organization-id is your organization id. This can be found 👉 here. The organization id is the same for your entire organization.
Type: string
Example: "94jfef9-a1cs-odw2-or3d-j43u5408fu3"
The data is the input data for your specific model. For formatting of the input data:
Look under "Your Models" to see a list of models associated with your organization
Under each model is a "Request Input Data" page that explains the parameters and format of the input data.
Type: string
Example:
{
exampleInputParameter: "parameter"
exampleInputParameterFloat: 4
}
Response Parameters
The model specific data that is returned, formatted as a JSON. For formatting of the JSON:
Look under "Your Models" to see a list of models associated with your organization.
Under each model is a "Response Output Data" page that explains the parameters and format of the JSON.
Type: json
Example:
{
data:
exampleModelOutput: "example"
exampleModelOutputFloat: 4
}
Any warnings that are returned alongside the model specific data.
Type: string
Example: "Warning message specific to your model"
A short description of the error that occurred. The error may or may not be model specific. For some common errors and possible fixes see here.
Type: string
Example: Organization {} does not have read permissions for model {}