Call the GET /api/v1/models endpoint to retrieve the list of available models on Model Studio. You can filter by model provider, modality type, model capability, and deployment mode, and get information such as pricing and context length.
Prerequisites
An API key has been created and configured as the environment variable DASHSCOPE_API_KEY. For more information, see Configure an API key in environment variables.
Request
HTTP method: GET
Request URL
Replace {WorkspaceId} with your workspace ID.
Region | Endpoint |
|---|---|
Singapore | |
China (Beijing) |
|
China (Hong Kong) | |
Germany (Frankfurt) |
|
Japan (Tokyo) |
|
US (Virginia) |
|
Authorization: Bearer {API_KEY} in the request header.
Request parameters
All parameters are passed via query string.
Parameter | Type | Required | Description |
|---|---|---|---|
providers | Array[String] | No | Filter by model provider. Valid values:
Example: |
inference_providers | Array[String] | No | Filter by inference provider. Valid values:
|
capabilities | Array[String] | No | Filter by modality type. Valid values:
Example: |
features | Array[String] | No | Filter by model capability. Valid values:
|
context_window | Integer | No | Filter by context length. Returns models with a context length greater than or equal to the specified value. Example: |
service_site | String | No | Filter by deployment mode. If not specified, models of all deployment modes are returned. Valid values:
|
supports | Array[String] | No | Filter by supported use case. Default value:
|
deployment_methods | Array[String] | No | Filter by deployment method. Valid values:
|
deployment_ptu_service_tiers | Array[String] | No | Filter by PTU type. You must also set |
name | String | No | Fuzzy search by model name. Example: |
model | String | No | Exact match by model ID. Example: |
language | String | No | Language of the response. Valid values: |
page_no | Integer | No | Page number, starting from 1. Default value: |
page_size | Integer | No | Number of models per page. Default value: |
Response parameters
Parameter | Type | Description |
|---|---|---|
request_id | String | Request ID for troubleshooting. |
output.total | Number | Total number of matching models. |
output.page_no | Number | Current page number. |
output.page_size | Number | Number of items per page. |
output.models[].model | String | Model ID, used to specify the model in API calls. |
output.models[].name | String | Display name of the model. |
output.models[].description | String | Description of the model. |
output.models[].provider | String | Model provider, such as |
output.models[].inference_provider | String | Inference provider, such as |
output.models[].capabilities | Array[String] | Modality types supported by the model. Values are the same as the |
output.models[].features | Array[String] | Capabilities supported by the model. Values are the same as the |
output.models[].published_time | String | Model release time in |
output.models[].inference_metadata | Object | Input and output modality information of the model. Contains the following fields:
|
output.models[].model_info | Object | Context length information of the model. A value of
|
output.models[].prices | Array[Object] | Pricing information. Each element contains:
|
Sample requests
Example 1: List all text generation models
Sample response
Error codes
If the call fails, an error message is returned. For more information about error codes and solutions, see Error messages.
Related documentation
- List model quotas
- Model list