Today’s world of machine learning (ML) and artificial intelligence (AI) presents a variety of challenges to organizations, particularly when it comes to productionizing AI capabilities at scale across their enterprise. The two phases in a ML model’s lifecycle – training and inference – are different in many ways. Mainly, the training phase occurs in the “lab” whereas the inference phase occurs in the real world on production-level systems. The drastic differences between these two environments cause many pain points for organizations. How can we replicate the training environment where models perform well in production? What if we have multiple different training environments for our different models? Can we leverage a single and centralized ML platform?
Modzy provides a solution to these questions and many more with a revolutionized approach for operationalizing the inference phase of the ML lifecycle. Specifically, organizations can leverage the Modzy APIs that give them the ability to scale AI capabilities into production with only a few lines of code.
Accessing the API
Access Key & Instance URL
When your organization purchases a Modzy subscription, each user has their own profile page which holds an abundance of useful information. In the context of submitting jobs to the Modzy API, it contains the user’s API access key and Instance URL. Figure 1 showcases the Modzy User Profile page and highlights the personal API access key and base URL. From a usability standpoint, the user must consider the following two items:
- Only half of the user’s API access key is shown on this page. When the user first activates theiraccount, the “GET KEY” button downloads a text file with the full API access key to the local machine, which should be saved for future access.
- The base URL in this example is https://demo.modzy.engineering, but the base URL required to access the API must include the “/api” extension, i.e., https://demo.modzy.engineering/api.
Figure 1. User profile page containing personal API access key, system account keys if they exist, instance base URL, and other useful pieces of information.
Model Identifier, Model Version, & Input Filename
While users can programmatically access information about the available models in their Modzy instances through an API call, they can also find this information on the Model Details page for the particular model they wish to use. After navigating to the Model Details page via the marketplace, users will find a few items needed to run a successful job through the Modzy API. Namely, they will need the Model Identifier, Model Version, and Input Filename. Figure 2 contains an example of a model’s “How To” portion of the Model Details page in the Modzy Marketplace that contains this information.
- Each model in Modzy holds its own unique Model Identifier – a 10-character string of numbers and letters – that allows users distinguish models when submitting jobs. The “API Request” portion of the “How To” section displays this first key piece of information.
- Modzy allows model creators to upload as many versions of a model as they wish. When users subscribe to a model, they can access all versions of the model that exist. The “API Request” portion of the “How To” section also displays the Model Version to include in a job request.
The Input Filename(s) is the third piece of model-specific information users need to submit job requests. This filename (or filenames depending on how many inputs the model accepts), serves as the key in the input portion of the API request dictionary. The value in this key-value pair is the location of the input file, which may look different depending on the input type (text inputs, embedded inputs, AWS s3 bucket inputs, database inputs, or local filesystem inputs).
Figure 2. “How to” portion of a model’s Model Details page that contains a sample API request, including the model identifier, model version, input filename, and more.
With just these few pieces of information, users can unlock the power of a library of AI models in just a few lines of code and begin integrating AI capabilities into their custom applications. For more information on using the Modzy APIs, visit our developer’s documentation site or the other tutorials available on our website.