获取模型列表
curl --request POST \
--url https://api.lmm.best/api/channel/fetch_models \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "<string>",
"type": 123,
"key": "<string>",
"channel_id": 123,
"advanced_custom": "<string>",
"header_override": "<string>",
"proxy": "<string>"
}
'import requests
url = "https://api.lmm.best/api/channel/fetch_models"
payload = {
"base_url": "<string>",
"type": 123,
"key": "<string>",
"channel_id": 123,
"advanced_custom": "<string>",
"header_override": "<string>",
"proxy": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
base_url: '<string>',
type: 123,
key: '<string>',
channel_id: 123,
advanced_custom: '<string>',
header_override: '<string>',
proxy: '<string>'
})
};
fetch('https://api.lmm.best/api/channel/fetch_models', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lmm.best/api/channel/fetch_models"
payload := strings.NewReader("{\n \"base_url\": \"<string>\",\n \"type\": 123,\n \"key\": \"<string>\",\n \"channel_id\": 123,\n \"advanced_custom\": \"<string>\",\n \"header_override\": \"<string>\",\n \"proxy\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}渠道管理
获取模型列表
👨💼 需要管理员权限(Admin)
POST
/
api
/
channel
/
fetch_models
获取模型列表
curl --request POST \
--url https://api.lmm.best/api/channel/fetch_models \
--header 'Content-Type: application/json' \
--data '
{
"base_url": "<string>",
"type": 123,
"key": "<string>",
"channel_id": 123,
"advanced_custom": "<string>",
"header_override": "<string>",
"proxy": "<string>"
}
'import requests
url = "https://api.lmm.best/api/channel/fetch_models"
payload = {
"base_url": "<string>",
"type": 123,
"key": "<string>",
"channel_id": 123,
"advanced_custom": "<string>",
"header_override": "<string>",
"proxy": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
base_url: '<string>',
type: 123,
key: '<string>',
channel_id: 123,
advanced_custom: '<string>',
header_override: '<string>',
proxy: '<string>'
})
};
fetch('https://api.lmm.best/api/channel/fetch_models', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.lmm.best/api/channel/fetch_models"
payload := strings.NewReader("{\n \"base_url\": \"<string>\",\n \"type\": 123,\n \"key\": \"<string>\",\n \"channel_id\": 123,\n \"advanced_custom\": \"<string>\",\n \"header_override\": \"<string>\",\n \"proxy\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}请求体
application/json
上游基础地址。编辑预览时显式空字符串表示清除已保存值,省略则沿用已保存值;相对上游路径要求非空的完整基础地址。
渠道类型。高级自定义渠道为 58。
新建渠道预览使用的 API 密钥。提供 channel_id 时忽略此字段,并在服务端使用渠道已保存的单密钥或多密钥配置。
可选的已保存渠道 ID。用于在不向前端返回密钥的情况下预览尚未保存的高级自定义配置。
可选的高级自定义配置 JSON 字符串。新建高级自定义渠道时必填;编辑预览时覆盖已保存配置,省略则沿用已保存配置。模型发现仅支持显式的 /v1/models 路由和 OpenAI data[].id 响应。
可选的全局请求头覆盖 JSON 字符串。编辑预览时覆盖已保存值,显式空字符串表示清除,省略则沿用。
可选的网络代理。编辑预览时覆盖已保存值,显式空字符串表示清除,省略则沿用。
响应
200
成功
最后修改于 2026年9月23日
⌘I