All Products
Search
Document Center

PolarDB:DescribeModelApis

Last Updated:Aug 25, 2026

Queries model APIs.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

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 gateway instance ID.

pg-xxxxxxxxxx

ModelApiIds

string

No

The model API IDs.

mi-xxx,mi-xxxx

Name

string

No

The model API name.

testName

ModelCategory

string

No

The model category. Valid values:

  • text

  • embedding

  • rerank

text

PageNumber

integer

No

The page number.

1

PageSize

integer

No

The number of entries per page. Valid values:

  • 30

  • 50

  • 100

Default value: 30.

30

PathPrefix

string

No

The API path prefix.

/test

Protocol

string

No

The protocol. Valid values:

  • openai

  • anthropic

  • bailian

  • vllm

openai

Status

string

No

The model API status.

Enable

RegionId

string

No

The region ID.

cn-beijing

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

Id of the request

C61892A4-0850-4516-9E26-44D96C1782DE

TotalRecordCount

integer

The total number of records.

1

PageRecordCount

integer

The number of records on the current page.

30

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries per page. Valid values: 30, 50, or 100.

Default value: 30.

30

Items

array<object>

The list of model APIs.

object

The model API object.

ModelApiId

string

The model API IDs.

mi-xxxx

Name

string

The model API name.

testName

Category

string

The model category. Valid values:

  • text

  • embedding

  • rerank

text

Status

string

The model API status.

Enable

Protocol

string

The protocol. Valid values:

  • openai

  • anthropic

  • bailian

  • vllm

openai

PathPrefix

string

The API path prefix.

tests/models/

RecordInput

string

The number of input tokens.

10

RecordOutput

string

The number of output tokens.

10

RouteRules

string

The routing rules list (JSON array 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": "[]" } ] } ]

Config

string

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]",
      "Config": "",
      "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.