添加渠道
curl --request POST \
--url https://api.lmm.best/api/channel/ \
--header 'Content-Type: application/json' \
--data '
{
"channel": {
"id": 123,
"name": "<string>",
"type": 123,
"status": 123,
"models": "<string>",
"groups": "<string>",
"priority": 123,
"weight": 123,
"base_url": "<string>",
"tag": "<string>"
}
}
'import requests
url = "https://api.lmm.best/api/channel/"
payload = { "channel": {
"id": 123,
"name": "<string>",
"type": 123,
"status": 123,
"models": "<string>",
"groups": "<string>",
"priority": 123,
"weight": 123,
"base_url": "<string>",
"tag": "<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({
channel: {
id: 123,
name: '<string>',
type: 123,
status: 123,
models: '<string>',
groups: '<string>',
priority: 123,
weight: 123,
base_url: '<string>',
tag: '<string>'
}
})
};
fetch('https://api.lmm.best/api/channel/', 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/"
payload := strings.NewReader("{\n \"channel\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"type\": 123,\n \"status\": 123,\n \"models\": \"<string>\",\n \"groups\": \"<string>\",\n \"priority\": 123,\n \"weight\": 123,\n \"base_url\": \"<string>\",\n \"tag\": \"<string>\"\n }\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
/
添加渠道
curl --request POST \
--url https://api.lmm.best/api/channel/ \
--header 'Content-Type: application/json' \
--data '
{
"channel": {
"id": 123,
"name": "<string>",
"type": 123,
"status": 123,
"models": "<string>",
"groups": "<string>",
"priority": 123,
"weight": 123,
"base_url": "<string>",
"tag": "<string>"
}
}
'import requests
url = "https://api.lmm.best/api/channel/"
payload = { "channel": {
"id": 123,
"name": "<string>",
"type": 123,
"status": 123,
"models": "<string>",
"groups": "<string>",
"priority": 123,
"weight": 123,
"base_url": "<string>",
"tag": "<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({
channel: {
id: 123,
name: '<string>',
type: 123,
status: 123,
models: '<string>',
groups: '<string>',
priority: 123,
weight: 123,
base_url: '<string>',
tag: '<string>'
}
})
};
fetch('https://api.lmm.best/api/channel/', 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/"
payload := strings.NewReader("{\n \"channel\": {\n \"id\": 123,\n \"name\": \"<string>\",\n \"type\": 123,\n \"status\": 123,\n \"models\": \"<string>\",\n \"groups\": \"<string>\",\n \"priority\": 123,\n \"weight\": 123,\n \"base_url\": \"<string>\",\n \"tag\": \"<string>\"\n }\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))
}最后修改于 2026年9月23日
⌘I