DescribeModelApis
Model Query API
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
polardb:DescribeModelApis |
none |
*All Resource
|
None | None |
Request syntax
POST HTTP/1.1
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| GwClusterId |
string |
Yes |
The ID of the gateway instance. |
pg-xxxxxxxxxx |
| ModelApiIds |
string |
No |
The IDs of the model APIs. Separate multiple IDs with a comma. |
mi-xxx,mi-xxxx |
| Name |
string |
No |
The name of the model API. |
testName |
| ModelCategory |
string |
No |
The model category. Valid values:
|
text |
| PageNumber |
integer |
No |
The page number. |
1 |
| PageSize |
integer |
No |
The number of entries per page. Valid values:
|
30 |
| PathPrefix |
string |
No |
The API path prefix. |
/test |
| Protocol |
string |
No |
The protocol. Valid values:
|
openai |
| Status |
string |
No |
The model API status. |
Enable |
| RegionId |
string |
No |
The ID of the region. |
cn-beijing |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The data returned. |
||
| RequestId |
string |
The ID of the request. |
C61892A4-0850-4516-9E26-44D96C1782DE |
| TotalRecordCount |
integer |
The total number of records that match the query. |
1 |
| PageRecordCount |
integer |
The number of records returned on the current page. |
30 |
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of records to return on each page. Valid values: 30, 50, and 100. Default value: 30. |
30 |
| Items |
array<object> |
A list of Model API objects. |
|
|
object |
A Model API object. |
||
| ModelApiId |
string |
The Model API ID. |
mi-xxxx |
| Name |
string |
The Model API name. |
testName |
| Category |
string |
The model category. Valid values:
|
text |
| Status |
string |
The Model API status. |
Enable |
| Protocol |
string |
The protocol. Valid values:
|
openai |
| PathPrefix |
string |
The API path prefix. |
tests/models/ |
| RecordInput |
string |
The number of input records. |
10 |
| RecordOutput |
string |
The number of output records. |
10 |
| RouteRules |
string |
A JSON array of routing rules, formatted as a string. |
[ { "RuleName": "string", "FallbackMode": "failover", "MatchModelListJson": "[]", "providerBalancerAlgorithm": "round-robin", "Providers": [ { "ModelServiceName": "string", "Weight": "0", "model_protocol": "vllm" "ModelList": "[]" } ], "FallbackProviders": [ { "ModelServiceName": "string", "model_protocol": "anthropic", "Weight": "10", "ModelList": "[]" } ] } ] |
| GmtCreated |
string |
The creation time. |
2024-10-16 16:46:20 |
Examples
Success response
JSON format
{
"RequestId": "C61892A4-0850-4516-9E26-44D96C1782DE",
"TotalRecordCount": 1,
"PageRecordCount": 30,
"PageNumber": 1,
"PageSize": 30,
"Items": [
{
"ModelApiId": "mi-xxxx",
"Name": "testName",
"Category": "text",
"Status": "Enable",
"Protocol": "openai",
"PathPrefix": "tests/models/",
"RecordInput": "10",
"RecordOutput": "10",
"RouteRules": "[\n {\n \"RuleName\": \"string\",\n \"FallbackMode\": \"failover\",\n \"MatchModelListJson\": \"[]\",\n \"providerBalancerAlgorithm\": \"round-robin\",\n \"Providers\": [\n {\n \"ModelServiceName\": \"string\",\n \"Weight\": \"0\",\n \"model_protocol\": \"vllm\"\n \"ModelList\": \"[]\"\n }\n ],\n \"FallbackProviders\": [\n {\n \"ModelServiceName\": \"string\",\n \"model_protocol\": \"anthropic\",\n \"Weight\": \"10\",\n \"ModelList\": \"[]\"\n }\n ]\n }\n]",
"GmtCreated": "2024-10-16 16:46:20\n"
}
]
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.