GET
/
v1
/
models
查看可用模型
curl --request GET \
  --url https://suanwuyou.com.cn/v1/models \
  --header 'Authorization: Bearer <token>'
import requests

url = "https://suanwuyou.com.cn/v1/models"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch('https://suanwuyou.com.cn/v1/models', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://suanwuyou.com.cn/v1/models"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "Bearer <token>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
{
  "object": "list",
  "data": [
    {
      "id": "gpt-5-codex",
      "object": "model",
      "owned_by": "suanwuyou"
    },
    {
      "id": "sora-v3-fast",
      "object": "model",
      "owned_by": "suanwuyou"
    }
  ]
}
{
"error": {
"message": "invalid api key",
"type": "invalid_request_error",
"code": "unauthorized"
}
}
第一次接入时建议先调用本接口,再把返回的 id 填入其他接口的 model 字段,避免模型名或令牌分组不匹配。

Authorizations

Authorization
string
header
default:Bearer sk-请输入算无忧令牌
required

填写完整的 Bearer 鉴权值,例如 Bearer sk-你的算无忧令牌。

Response

模型列表。

object
string
required
Allowed value: "list"
data
object[]
required