API operations
The Lindorm AI engine provides a RESTful API for model management, model inference, and parameter adjustment. This topic describes the endpoints, authentication mechanism, response format, and API operations for the Lindorm AI RESTful API.
Prerequisites
The AI engine must be activated. For instructions, see the Activation Guide.
Authentication mechanism
When you send an HTTP request, add the following keys to the request header:
x-ld-ak: The username for accessing the AI engine.x-ld-sk: The password for accessing the AI engine.
To obtain your credentials, see Obtaining connection information.
Common URL parameters
The RESTful API supports the following URL parameters:
Parameter | Type | Description |
pretty | BOOLEAN | Specifies whether to pretty-print the JSON response. |
Response format
The RESTful API returns standard HTTP status codes and uses a JSON object in the response body to detail the request's execution.
Status codes
HTTP status code | Description |
200 OK | The request was successful. |
400 Bad Request | The requested URI or input parameters are invalid. |
401 Unauthorized | Authentication failed. |
404 Not Found | The requested URI does not exist. |
405 Method Not Allowed | The HTTP method is not allowed for the requested resource. |
413 Request Entity Too Large | The request entity is too large. |
500 Internal Server Error | An internal error occurred. This can indicate a server-side exception. |
Response body format
{
"code": 0,
"msg": "",
"data": "",
"success": true
}Response field | Description |
code | The status code for the operation. Valid values:
|
msg |
|
data | The request result. The format varies by API. For details, see the specific API definition. |
success | Indicates whether the operation was successful. Valid values:
|
API operations
Type | Description | References |
Model management | Allows you to deploy, list, and delete models, as well as view details and upload model files. | |
Model inference | Allows you to perform inference for features such as feature extraction, Q&A, and semantic similarity. | |
Parameter adjustment | Allows you to adjust the parameters of deployed models. |