You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//no reference to node.js in here but it is in contributing.
94
67
95
-
== Usage
68
+
== Initialize
69
+
70
+
Once you have a `model` and `version` identified, get authenticated with your API key.
71
+
72
+
API keys are security credentials required to perform API requests to Modzy. Our API keys are composed of an ID that is split by a dot into two parts: the prefix and the body. +
73
+
The *prefix* is the API keys' visible part. It’s only used to identify the key and by itself, it’s unable to perform API requests.
96
74
75
+
link:https://models.modzy.com/docs/users-keys/api-keys/retrieve-users-api-keys[List your API keys]:
97
76
98
-
=== Initialize
77
+
[source, js]
78
+
----
79
+
----
80
+
81
+
The *body* is the prefix’s complement and it’s required to perform API requests. Since it’s not stored on Modzy’s servers, it cannot be recovered. Make sure to save it securely. If lost, you can link:https://models.modzy.com/docs/users-keys/api-keys/replace-API-key[replace the API key's body].
82
+
83
+
link:https://models.modzy.com/docs/users-keys/api-keys/retrieve-full-API-key[Retrieve the API key's body]:
84
+
85
+
[source, js]
86
+
----
87
+
----
99
88
100
-
Once you have a `model` and `version` identified, authenticate to Modzy with your API key:
89
+
Get authenticated with your API key:
101
90
102
91
[source, js]
103
92
----
104
93
const modzy = require('modzy-sdk');
105
-
const modzyClient = new modzy.ModzyClient("http://url.to.modzy/api", "my_key.modzy");
94
+
const modzyClient = new modzy.ModzyClient("http://url.to.modzy/api", "prefix.body");
Modzy’s Marketplace includes pre-trained and re-trainable AI models from industry-leading machine learning companies, accelerating the process from data to value.
122
112
123
-
<br>
124
-
++++
113
+
The Model service drives the Marketplace and can be integrated with other applications, scripts, and systems. It provides routes to list, search, and filter model and model-version details.
link:https://models.modzy.com/docs/marketplace/tags/retrieve-models-by-tags[List models by tag]:
140
+
141
+
[source, js]
142
+
----
143
+
144
+
----
145
+
146
+
=== Get a model's details
147
+
148
+
Models accept specific *input file link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types[MIME] types*. Some models may require multiple input file types to run data accordingly. In this sample, we use a model that requires `input.txt`.
141
149
142
-
Get a model's details:
150
+
Models require inputs to have a specific *input name* declared in the job request. This name can be found in the model’s details. In this sample, we use a model that requires `text/plain`.
151
+
152
+
Additionally, users can set their own input names. When multiple input items are processed in a job, these names are helpful to identify and get each input’s results. In this sample, we use a model that requires `input-1` and `input-2`.
153
+
154
+
link:https://models.modzy.com/docs/marketplace/models/retrieve-model-details[Get a model's details]:
Model specific sample requests are available in the version details and in the Model Details page.
150
163
151
-
Submit a job providing the model, version, and input file:
164
+
link:https://models.modzy.com/docs/marketplace/versions/retrieve-version-details[Get version details]:
165
+
166
+
[source, js]
167
+
----
168
+
169
+
----
170
+
171
+
=== Submit a job and get results
172
+
173
+
A *job* is the process that sends data to a model, sets the model to run the data, and returns results.
174
+
175
+
Modzy supports several *input types* such as `text`, `embedded` for Base64 strings, `aws-s3` and `aws-s3-folder` for inputs hosted in buckets, and `jdbc` for inputs stored in databases. In this sample, we use `text`.
176
+
177
+
Submit a job with the model, version, and input items:
152
178
153
179
[source, js]
154
180
----
@@ -167,7 +193,6 @@ Hold until the inference is complete and results become available:
167
193
[source, js]
168
194
----
169
195
job = await modzyClient.blockUntilComplete(job);
170
-
171
196
----
172
197
173
198
Get the output results:
@@ -202,6 +227,10 @@ catch(error){
202
227
203
228
== Features
204
229
230
+
Modzy supports link:https://models.modzy.com/docs/features/batch-processing[batch processing], link:https://models.modzy.com/docs/features/explainability[explainability], and link:https://models.modzy.com/docs/features/model-drift[model drift detection].
0 commit comments