Corsali
  • Documentation Overview
  • Model API
    • cURL Example
    • Python Example
    • Errors
  • First Time User Guide
    • API Walkthrough
  • Authentication Keys
Powered by GitBook
On this page
  • Contents
  • Get Prediction
  • Request Parameters
  • Content-Type
  • Authorization
  • x-corsali-organization-id
  • data
  • Response Parameters
  • data
  • warning
  • error

Was this helpful?

Model API

Description of Model API parameters

PreviousDocumentation OverviewNextcURL Example

Last updated 3 years ago

Was this helpful?

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 .

Contents

Get Prediction

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

Name
Type
Description

data

string

JSON containing the data that is fed into the model.

Headers

Name
Type
Description

Content-Type

string

Type of content such as "application/json"

Authorization

string

"Bearer: <Authentication Key>"

x-corsali-organization-id

string

Organization ID

{"data": "model specific return data", "warning": "If a warning occured"}
{"error": "specific error information"}

Request Parameters

Content-Type

Type: string

  • Required: yes

  • Example: "application/json"

Authorization

Type: string

  • Required: yes

  • Example: "Bearer: eyJxxx.eyJxxx.1ANxxx"

x-corsali-organization-id

Type: string

  • Required: yes

  • Example: "94jfef9-a1cs-odw2-or3d-j43u5408fu3"

data

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

  • Required: yes

  • Example:

    { exampleInputParameter: "parameter"

    exampleInputParameterFloat: 4 }

Response Parameters

data

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

  • Required: yes

  • Example:

    { data: exampleModelOutput: "example"

    exampleModelOutputFloat: 4 }

warning

Any warnings that are returned alongside the model specific data.

Type: string

  • Required: no

  • Constraints: None

  • Example: "Warning message specific to your model"

error

Type: string

  • Required: no

  • Constraints: None

  • Example: Organization {} does not have read permissions for model {}

The content type will be "application/json" unless specified otherwise for your specific model. This information can be found 👉 .

The authorization header is in the format "Bearer: <Authentication Key>". For more information on authentication keys see 👉 .

The x-corsali-organization-id is your organization id. This can be found 👉 . The organization id is the same for your entire organization.

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
here
here
here
First Time User guide
Get Prediction
Request Parameters
Response Parameters