The Lindorm AI engine provides RESTful APIs that you can use to manage models, perform model inference, and adjust parameters. This topic describes the endpoints, authentication mechanism, response format, and supported API operations for application development.
Prerequisites
The AI engine must be activated. For more information, 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 to access the AI engine.
x-ld-sk: The password to access the AI engine.
For more information, see Obtaining connection information.
Common request URL parameters
The REST API supports the following URL parameters:
Parameter name | Type | Description |
pretty | BOOLEAN | Specifies whether to display the JSON response in a pretty format for better readability. |
Response format
The REST API uses standard HTTP status codes. The HTTP body contains a JSON object that describes the request execution details.
Status codes
HTTP Status Code | Description |
200 OK | The request was successful. |
400 Bad Request | Bad request. The request URI format or input parameters are invalid. |
401 Unauthorized Request | Request authentication failed. |
404 Not Found | The requested URI does not exist. |
405 Method Not Allowed | The HTTP request method is invalid. |
413 Request Entity Too Large | The request entity is too large. |
500 Internal Server Error | An internal error occurred on the server-side. |
Response body format
{
"code": 0,
"msg": "",
"data": "",
"success": true
}Response Field | Description |
code | The status code. Valid values:
|
msg |
|
data | The result of the request. The format varies by API. For more information, see each API definition. |
success | Indicates whether the operation was successful. Valid values:
|
API operations
Type | Description | References |
Model management (such as model deployment and viewing model information) | Use the model management RESTful API operations to deploy models, view a list of models, view model details, delete specific models, and upload model files. | |
Model inference | Use the model inference RESTful API operations to perform inference for various features, such as feature extraction, Q&A, and semantic similarity. | |
Parameter adjustment | Use the parameter adjustment RESTful API operations to adjust the parameter settings of deployed models. |