Lai, Weijian 68e5cd0687 ModelArts API 23.3.0 Version.
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lai, Weijian <laiweijian4@huawei.com>
Co-committed-by: Lai, Weijian <laiweijian4@huawei.com>
2024-06-18 11:02:37 +00:00

749 lines
44 KiB
HTML

<a name="EN-US_TOPIC_0000001909847888"></a><a name="EN-US_TOPIC_0000001909847888"></a>
<h1 class="topictitle1">Importing Models</h1>
<div id="body0000001588873521"><div class="section"><h4 class="sectiontitle">Function</h4><p>This API is used to import a model. The execution code and model must be uploaded to OBS first. By default, the model generated by a training job is stored in OBS.</p>
</div>
<div class="section"><h4 class="sectiontitle">Constraints</h4><p>The body parameter requirements for importing a model using a template are different from those for importing a model without using a template. In the following body parameters, <strong>template parameters</strong> indicate the parameters that can be configured when a model is imported using a template, <strong>non-template parameters</strong> indicate the parameters that can be configured when a model is imported without using a template, and <strong>public parameters</strong> indicate the parameters that are irrelevant to the model import mode.</p>
<ul><li><p>When a model is imported using a template (<strong>model_type</strong> is set to <strong>Template</strong>), the <strong>template</strong> field is mandatory and the <strong>source_location</strong> field does not need to be configured.</p>
</li><li><p>If a model is imported without using a template (<strong>model_type</strong> is not set to <strong>Template</strong>), <strong>source_location</strong> is mandatory and <strong>template</strong> does not need to be configured.</p>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001909847888__atuogenerate_1"><h4 class="sectiontitle">Debugging</h4><p>You can debug this API through automatic authentication in or use the SDK sample code generated by API Explorer.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001909847888__atuogenerate_2"><h4 class="sectiontitle">URI</h4><p>POST /v1/{project_id}/models</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.3.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.1 "><p>project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.3.2.5.1.4 "><p>Project ID. For details, see <a href="modelarts_03_0147.html">Obtaining a Project ID and Name</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909847888__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.2.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.2.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.2.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.5.2.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.2.2.5.1.1 "><p>X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.2.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.2.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.2.2.5.1.4 "><p>User token. It can be obtained by calling the IAM API that is used to obtain a user token. The value of <strong>X-Subject-Token</strong> in the response header is the user token.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909847888__request_CreateModelRequest" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.5.3.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>model_docs</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>Array of <a href="#EN-US_TOPIC_0000001909847888__request_GuideDoc">GuideDoc</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>List of model description documents. A maximum of three documents are supported. <strong>Common parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>template</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p><a href="#EN-US_TOPIC_0000001909847888__request_template">template</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Configuration items in a template. This parameter is mandatory when <strong>model_type</strong> is set to <strong>Template</strong>. <strong>Template parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>model_version</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Model version in the format of <em>Digit.Digit.Digit</em>. Each digit is a one-digit or two-digit positive integer, but cannot start with 0. For example, <strong>01.01.01</strong> is not allowed. <strong>Common parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>source_job_version</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Version of the source training job. If the model is generated from a training job, input this parameter for source tracing. If the model is imported from a third-party meta model, leave this parameter blank. This parameter is left blank by default. <strong>Non-template parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>source_location</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>OBS path where the model is located or the SWR image location</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>source_copy</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Whether to enable image replication. This parameter is valid only when <strong>model_type</strong> is set to <strong>Image</strong>.</p>
<p>Options:</p>
<ul><li><p><strong>true</strong>: Default value, indicating that image replication is enabled. After this function is enabled, AI applications cannot be rapidly created, and modifying or deleting an image in the SWR source directory will not affect service deployment.</p>
</li><li><p><strong>false</strong>: Image replication is not enabled. After this function is disabled, AI applications can be rapidly created, but modifying or deleting an image in the SWR source directory will affect service deployment.</p>
</li></ul>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>initial_config</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Character string converted from the model configuration file. Obtain fields such as <strong>apis</strong>, <strong>dependencies</strong>, <strong>input_params</strong>, and <strong>output_params</strong> in the <strong>initial_config</strong> configuration file. <strong>Non-template parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>execution_code</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>OBS path for storing the execution code. By default, this parameter is left blank. The name of the execution code file is consistently to be <strong>customize_service.py</strong>. The inference code file must be stored in the <strong>model</strong> directory. This parameter can be left blank. Then, the system will automatically identify the inference code in the <strong>model</strong> directory. <strong>Common parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>source_job_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>ID of the source training job. If the model is generated from a training job, input this parameter for source tracing. If the model is imported from a third-party meta model, leave this parameter blank. This parameter is left blank by default. <strong>Non-template parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>model_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Model type, which can be <strong>TensorFlow</strong>, <strong>MXNet</strong>, <strong>Caffe</strong>, <strong>Spark_MLlib</strong>, <strong>Scikit_Learn</strong>, <strong>XGBoost</strong>, <strong>Image</strong>, <strong>PyTorch</strong>, or <strong>Template</strong> read from the configuration file. <strong>Common parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>output_params</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>Array of <a href="#EN-US_TOPIC_0000001909847888__request_CreateModelRequestInferParams">CreateModelRequestInferParams</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Collection of output parameters of a model. By default, this parameter is left blank. If the parameters are read from <strong>apis</strong> in the configuration file, provide only the <strong>initial_config</strong> field, and this field can be left blank. <strong>Non-template parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>description</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Model description that consists of 1 to 100 characters. The following special characters cannot be contained: &amp;!'"&lt;&gt;= <strong>Common parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>runtime</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Model runtime environment. Its possible values are determined based on <strong>model_type</strong>. For details, see</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>model_metrics</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Model precision. If the value is read from the configuration file, this parameter can be left blank. <strong>Non-template parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>source_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Model source type, which can only be <strong>auto</strong>, indicating an ExeML model (model download is not allowed). If the model is obtained from a training job, leave this parameter blank. This parameter is left blank by default. <strong>Non-template parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>dependencies</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>Array of <a href="#EN-US_TOPIC_0000001909847888__request_ModelDependencies">ModelDependencies</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Package required for inference code and model. By default, this parameter is left blank. If the package is read from the configuration file, this parameter can be left blank. <strong>Non-template parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>workspace_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Workspace ID, which defaults to <strong>0</strong>. <strong>Common parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>model_algorithm</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Model algorithm. If the algorithm is read from the configuration file, this parameter can be left blank. The value can be <strong>predict_analysis</strong>, <strong>object_detection</strong>, or <strong>image_classification</strong>. <strong>Non-template parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>apis</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>Array of <a href="#EN-US_TOPIC_0000001909847888__request_CreateModelRequestModelApis">CreateModelRequestModelApis</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>All API input and output parameters of the model. If the parameters are parsed from the configuration file, this parameter can be left blank. <strong>Non-template parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>model_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Model name, which consists of 1 to 64 characters. <strong>Common parameter</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>install_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Deployment type. Only lowercase letters are supported. The value can be <strong>real-time</strong> or batch. Default value: [<strong>real-time</strong>, <strong>batch</strong>]</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.1 "><p>input_params</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.5.1.3 "><p>Array of <a href="#EN-US_TOPIC_0000001909847888__request_CreateModelRequestInferParams">CreateModelRequestInferParams</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.3.2.5.1.4 "><p>Collection of input parameters of a model. By default, this parameter is left blank. If the parameters are read from <strong>apis</strong> in the configuration file, provide only the <strong>initial_config</strong> field, and this field can be left blank. <strong>Non-template parameter</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001909847888__request_GuideDoc"></a><a name="request_GuideDoc"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909847888__request_GuideDoc" frame="border" border="1" rules="all"><caption><b>Table 4 </b>GuideDoc</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.5.4.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.5.1.1 "><p>doc_url</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.4.2.5.1.4 "><p>HTTP(S) link of the document</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.5.1.1 "><p>doc_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.4.2.5.1.4 "><p>Document name, which must start with a letter.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001909847888__request_template"></a><a name="request_template"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909847888__request_template" frame="border" border="1" rules="all"><caption><b>Table 5 </b>template</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.5.5.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.5.1.1 "><p>infer_format</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.5.2.5.1.4 "><p>ID of the input and output mode. When this parameter is used, the input and output mode built in the template does not take effect.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.5.1.1 "><p>template_inputs</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.5.1.3 "><p>Array of <a href="#EN-US_TOPIC_0000001909847888__request_CreateModelRequestTemplateInput">CreateModelRequestTemplateInput</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.5.2.5.1.4 "><p>Template input configuration, specifying the source path for configuring a model.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.5.1.1 "><p>template_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.5.2.5.1.4 "><p>ID of the used template. The template has a built-in input and output mode.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001909847888__request_CreateModelRequestTemplateInput"></a><a name="request_CreateModelRequestTemplateInput"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909847888__request_CreateModelRequestTemplateInput" frame="border" border="1" rules="all"><caption><b>Table 6 </b>CreateModelRequestTemplateInput</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.6.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.5.6.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.5.1.1 "><p>input</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.6.2.5.1.4 "><p>Template input path, which can be a path to an OBS file or directory. When you use a template with multiple input items to create a model, if the target paths <strong>input_properties</strong> specified in the template are the same, the OBS directory or OBS file name entered here must be unique to prevent files from being overwritten.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.5.1.1 "><p>input_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.6.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.6.2.5.1.4 "><p>Input item ID, which is obtained from template details</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001909847888__request_ModelDependencies"></a><a name="request_ModelDependencies"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909847888__request_ModelDependencies" frame="border" border="1" rules="all"><caption><b>Table 7 </b>ModelDependencies</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.7.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.7.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.7.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.5.7.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.5.1.1 "><p>installer</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.7.2.5.1.4 "><p>Installation mode. Only pip is supported.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.5.1.1 "><p>packages</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.7.2.5.1.3 "><p>Array of <a href="#EN-US_TOPIC_0000001909847888__request_Packages">Packages</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.7.2.5.1.4 "><p>Collection of dependency packages</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001909847888__request_Packages"></a><a name="request_Packages"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909847888__request_Packages" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Packages</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.8.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.5.8.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.5.1.1 "><p>package_version</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.8.2.5.1.4 "><p>Version of a dependency package. If this parameter is left blank, the latest version is installed by default.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.5.1.1 "><p>package_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.8.2.5.1.4 "><p>Name of a dependency package. Ensure that the package name is correct and available.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.5.1.1 "><p>restraint</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.8.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.8.2.5.1.4 "><p>Version restriction, which can be <strong>EXACT</strong>, <strong>ATLEAST</strong>, or <strong>ATMOST</strong>. This parameter is mandatory only when <strong>package_version</strong> is available.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001909847888__request_CreateModelRequestModelApis"></a><a name="request_CreateModelRequestModelApis"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909847888__request_CreateModelRequestModelApis" frame="border" border="1" rules="all"><caption><b>Table 9 </b>CreateModelRequestModelApis</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.9.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.9.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.9.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.5.9.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.5.1.1 "><p>protocol</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.9.2.5.1.4 "><p>Request protocol</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.5.1.1 "><p>method</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.9.2.5.1.4 "><p>Request method, which can be <strong>post</strong> or <strong>get</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.5.1.1 "><p>input_params</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.5.1.3 "><p><a href="#EN-US_TOPIC_0000001909847888__request_ModelInOutputParams">ModelInOutputParams</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.9.2.5.1.4 "><p>API input and output parameters, described in JSON Schema format</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.5.1.1 "><p>output_params</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.5.1.3 "><p><a href="#EN-US_TOPIC_0000001909847888__request_ModelInOutputParams">ModelInOutputParams</a> object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.9.2.5.1.4 "><p>API input and output parameters, described in JSON Schema format</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.5.1.1 "><p>url</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.9.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.9.2.5.1.4 "><p>Inference request URL</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001909847888__request_ModelInOutputParams"></a><a name="request_ModelInOutputParams"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909847888__request_ModelInOutputParams" frame="border" border="1" rules="all"><caption><b>Table 10 </b>ModelInOutputParams</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.10.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.10.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.10.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.5.10.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.5.1.1 "><p>type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.10.2.5.1.4 "><p>Type in JSON Schema, which can be <strong>object</strong></p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.5.1.1 "><p>properties</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.10.2.5.1.3 "><p>Object</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.10.2.5.1.4 "><p>Properties of an object element in JSON Schema. You can configure parameters, including the parameter name and type.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001909847888__request_CreateModelRequestInferParams"></a><a name="request_CreateModelRequestInferParams"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909847888__request_CreateModelRequestInferParams" frame="border" border="1" rules="all"><caption><b>Table 11 </b>CreateModelRequestInferParams</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.11.2.5.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.11.2.5.1.2"><p>Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.11.2.5.1.3"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.5.11.2.5.1.4"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.1 "><p>protocol</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.11.2.5.1.4 "><p>Request protocol</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.1 "><p>min</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.3 "><p>Number</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.11.2.5.1.4 "><p>This parameter is optional when <strong>param_type</strong> is set to <strong>int</strong> or <strong>float</strong>. By default, this parameter is left blank.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.1 "><p>method</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.11.2.5.1.4 "><p>Request method, which can be <strong>post</strong> or <strong>get</strong>.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.1 "><p>max</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.3 "><p>Number</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.11.2.5.1.4 "><p>This parameter is optional when <strong>param_type</strong> is set to <strong>int</strong> or <strong>float</strong>. By default, this parameter is left blank.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.1 "><p>param_desc</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.2 "><p>No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.11.2.5.1.4 "><p>Parameter description. It is recommended that the parameter description contain a maximum of 100 characters. By default, this parameter is left blank.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.1 "><p>param_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.11.2.5.1.4 "><p>Parameter name. It is recommended that the parameter name contain a maximum of 64 characters.</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.1 "><p>url</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.11.2.5.1.4 "><p>API URL</p>
</td>
</tr>
<tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.1 "><p>param_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.2 "><p>Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.11.2.5.1.3 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.5.11.2.5.1.4 "><p>Parameter type, which can be <strong>int</strong>, <strong>string</strong>, <strong>float</strong>, <strong>timestamp</strong>, <strong>date</strong>, or <strong>file</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Response Parameters</h4><p><strong>Status code: 200</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909847888__response_CreateModelResponse" frame="border" border="1" rules="all"><caption><b>Table 12 </b>Response body parameters</caption><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.6.3.2.4.1.1"><p>Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.6.3.2.4.1.2"><p>Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.6.3.2.4.1.3"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.6.3.2.4.1.1 "><p>model_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.6.3.2.4.1.2 "><p>String</p>
</td>
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.6.3.2.4.1.3 "><p>Model ID</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Example Requests</h4><p>The following shows how to import a model whose name is <strong>mnist</strong>, version is <strong>1.0.0</strong>, and type is <strong>TensorFlow</strong>. The model file comes from an OBS bucket.</p>
<pre class="screen">POST https://{endpoint}/v1/{project_id}/models
{
"model_name" : "mnist",
"model_version" : "1.0.0",
"source_location" : "https://models.obs.xxxxx.com/mnist",
"source_job_id" : "55",
"source_job_version" : "V100",
"model_type" : "TensorFlow",
"runtime" : "python2.7",
"description" : "mnist model",
"execution_code" : "https://testmodel.obs.xxxxx.com/customize_service.py",
"input_params" : [ {
"url" : "/v1/xxx/image",
"protocol" : "http",
"method" : "post",
"param_name" : "image_url",
"param_type" : "string",
"min" : 0,
"max" : 9,
"param_desc" : "http://test/test.jpeg"
} ],
"output_params" : [ {
"url" : "/v1/xxx/image",
"protocol" : "http",
"method" : "post",
"param_name" : "face_location",
"param_type" : "box",
"param_desc" : "face_location param value description"
} ],
"dependencies" : [ {
"installer" : "pip",
"packages" : [ {
"package_name" : "numpy",
"package_version" : "1.5.0",
"restraint" : "ATLEAST"
} ]
} ],
"model_algorithm" : "object_detection",
"model_metrics" : "{\"f1\":0.52381,\"recall\":0.666667,\"precision\":0.466667,\"accuracy\":0.625}",
"apis" : [ {
"url" : "/v1/xxx/image",
"protocol" : "http",
"method" : "post",
"input_params" : {
"type" : "object",
"properties" : {
"image_url" : {
"type" : "string"
}
}
},
"output_params" : {
"type" : "object",
"properties" : {
"face_location" : {
"type" : "box"
}
}
}
} ]
}</pre>
</div>
<div class="section"><h4 class="sectiontitle">Example Responses</h4><p><strong>Status code: 200</strong></p>
<p>The model is created.</p>
<pre class="screen">{
"model_id" : "7feb7235-ed9c-48ae-9833-2876b2458445"
}</pre>
</div>
<div class="section"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001909847888__status_code" frame="border" border="1" rules="all"><thead align="left"><tr><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.9.2.1.3.1.1"><p>Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.9.2.1.3.1.2"><p>Description</p>
</th>
</tr>
</thead>
<tbody><tr><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.9.2.1.3.1.1 "><p>200</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.9.2.1.3.1.2 "><p>The model is created.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section"><h4 class="sectiontitle">Error Codes</h4><p>See <a href="modelarts_03_0095.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="topic_300000004.html">Model Management</a></div>
</div>
</div>