获取预置模型详情
更新时间:2025-09-15
接口描述
本接口用于获取预置模型详情。
鉴权说明
调用本文API,使用“基于安全认证AK/SK”进行签名计算鉴权,即使用安全认证中的Access Key ID 和 Secret Access Key进行鉴权,具体鉴权认证机制参考HTTP调用鉴权说明。
请求结构
                Bash
                
            
            1POST /v2/model?Action=DescribeSystemModelSet HTTP/1.1
2Host: qianfan.baidubce.com
3Authorization: authorization string
4Content-Type: application/json
5
6{
7    "modelSetName":"ERNIE Lite"
8}
            请求头域
除公共头域外,无其它特殊头域。
请求参数
- Query参数
 
| 名称 | 类型 | 必填 | 描述 | 
|---|---|---|---|
| Action | string | 是 | 方法名称,固定值DescribeSystemModelSet | 
- Body参数
 
| 名称 | 类型 | 必填 | 描述 | 
|---|---|---|---|
| modelSetName | string | 否 | 模型名称,该字段与modelSetId不能同时使用,至少选择其中一个 | 
| modelSetId | string | 否 | 模型id,说明: (1)该字段与modelSetName不能同时使用,至少选择其中一个 (2) 通过以下式获取该字段值: 调用获取预置模型列表接口,返回的modelSetId字段获取  | 
响应头域
除公共头域外,无其它特殊头域。
响应参数
| 名称 | 类型 | 描述 | 
|---|---|---|
| requestId | string | 请求ID | 
| result | object | 请求结果 | 
result说明
| 名称 | 类型 | 描述 | 
|---|---|---|
| modelSetId | string | 模型id,字符串类型 | 
| modelSetName | string | 模型名称 | 
| modelType | string | 模型类型 | 
| createTime | string | 创建时间 | 
| modifyTime | string | 修改时间 | 
| description | string | 模型描述 | 
| modelIds | List<string> | 模型拥有的模型id列表 | 
| modelNames | List<string> | 模型拥有的模型版本号列表 | 
请求示例
                Bash
                
            
            1# 替换下列示例中的Authorization值、x-bce-date值
2curl -i --location 'https://qianfan.baidubce.com/v2/model?Action=DescribeSystemModelSet'\
3--header 'Authorization: bce-auth-v1/f0ee7axxxx/2023-09-19T13:42:13Z/180000/host;x-bce-date/9a8cfxxxxxxx74525543'\ 
4--header 'x-bce-date: 2023-09-19T13:37:10Z'\
5--header 'Content-Type: application/json'\ 
6--data '{
7      "modelSetName":"ERNIE Lite"
8}
            响应示例
                JSON
                
            
            1HTTP/1.1 200 OK
2{
3    "requestId": "307ce086-f5b7-46e0-910b-806a4499e75a",
4    "result": {
5        "modelSetId": "am-ju3hi4ts39u9",
6        "modelSetName": "ERNIE Lite",
7        "modelType": "Text2Text",
8        "createTime": "2023-06-15T14:46:33+08:00",
9        "modifyTime": "2025-08-22T14:05:04+08:00",
10        "description": "百度自研的轻量级大语言模型,兼顾优异的模型效果与推理性能,适合低算力AI加速卡推理使用。",
11        "modelIds": [
12            "amv-irrrsmxabb6r",
13            "amv-k8npfy0yz90r",
14            "amv-b97au559tvvn"
15        ],
16        "modelNames": [
17            "ERNIE-Lite-8K-0308",
18            "ERNIE-Lite-128K-0419",
19            "ERNIE-Lite-128K-0722"
20        ]
21    }
22}
            错误码
若请求错误,服务器将返回的JSON文本包含以下参数:
| 名称 | 描述 | 
|---|---|
| requestId | 请求ID | 
| code | 错误码 | 
| message | 错误描述信息,帮助理解和解决发生的错误 | 
例如错误返回:
                Plain Text
                
            
            1{
2    "requestId":"6ba7b810-xxxc04fd430c8",
3    "code":"AccessDenied",
4    "message":"Access denied."
5}
            更多其他错误码,也可以查看错误码说明。
