Overview

To submit a job request, send input items, a model identifier, and a version number.

Modzy can run data stored in AWS S3 buckets. Input items stored in an S3 bucket may include one data file or a directory with multiple data files.

Sample request

POST /api/jobs HTTP/1.1
Host: app.modzy.com
Authorization: ApiKey apikey.modzy
Content-Type: application/json
Accept: application/json

{
  "model": {
    "identifier": "ed542963de",
    "version": "0.0.27"
 },
  "input": {
    "type": "aws-s3",
    "accessKeyID": "key",
    "secretAccessKey": "secret-key",
    "region": "us-east-1",
    "sources": {
      "input-item": {
        "model-input-name": {
          "bucket": "bucket",
          "key": "input_folder/happy.txt"
        }
      }
    }
  }
}

Sample response

{
  "model": {
    "identifier": "ed542963de",
    "version": "0.0.27",
    "name": "Sentiment Analysis"
  },
  "status": "SUBMITTED",
  "totalInputs": 1,
  "jobIdentifier": "2700725a-9c84-40ae-bbeb-4fce0d35424e",
  "accessKey": "apikey",
  "explain": false,
  "jobType": "batch",
  "accountIdentifier": "demo-account",
  "team": {
    "identifier": "demo-team"
  },
  "user": {
    "identifier": "demo-user-id",
    "firstName": "demo",
    "lastName": "user",
    "email": "[email protected]"
  },
  "jobInputs": {
      "identifier": ["texts"]    
  },
  "submittedAt": "2021-08-02T21:19:52.529+00:00",
  "hoursDeleteInput": 1,
  "imageClassificationModel": false
}

Request body parameters for AWS S3

Parameter

Type

Description

model (required)

object

An object that contains the model parameters modelID and modelVersion.

input (required)

object

Contains all the input type and sources.

explain

string

Sets the explainability feature when a model offers the option.

timeout

string

A timeout in milliseconds for the job’s status to transition to TIMEDOUT. The job doesn’t timeout if this value is not provided.

input object

Parameter

Type

Description

type (required)

string

The input type to be processed. Use aws-s3 to run a single item or aws-s3-folder to run all the items in a folder.

accessKeyID (required)

string

The access key ID provided by AWS.

secretAccessKey (required)

string

The secret access key provided by AWS.

region (required)

string

Name of the geographical area where the input item is stored by AWS.

sources (required)

object

Contains all the input item objects to be processed.

input_item object

Parameters

Type

Description

input_item (required)

object

Contains the input to be processed by the model. This parameter's key can have any name. Its name matches the output's name.

model_input_name object

Parameters

Type

Description

model_input_name (required)

object

Contains an AWS bucket URL and the AWS key. This parameter's key needs to match the model’s input name. Add one per bucket. Set the key to a file for aws-s3or a directory for aws-s3-folder.

For additional information see Jobs.


Did this page help you?