API手册
获取用户模型列表
检索模型信息。
AuthorizationBearer <token>required
添加 Header 'Authorization: Bearer {账户 API Key}' 进行鉴权
In: header
Query Parameters
typestring
模型类型
Value in
"text" | "image" | "audio" | "video"sub_typestring
模型子类型。您可以使用它来单独筛选模型,而无需设置 type。
Value in
"chat" | "embedding" | "reranker" | "text-to-image" | "image-to-image" | "speech-to-text" | "text-to-video"Response Body
成功响应
TypeScript Definitions
Use the response body type in TypeScript.
objectstring
Example
"list"dataarray<object>
curl --request GET \
--url https://api.siliconflow.cn/v1/models \
--header 'Authorization: Bearer <token>'
import requests
url = "https://api.siliconflow.cn/v1/models"
headers = {"Authorization": "Bearer <token>"}
response = requests.request("GET", url, headers=headers)
print(response.text)
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.siliconflow.cn/v1/models', options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));
{
"object": "list",
"data": [
{
"id": "stabilityai/stable-diffusion-xl-base-1.0",
"object": "model",
"created": 0,
"owned_by": ""
}
]
}{
"code": 20012,
"message": "string",
"data": "string"
}"Invalid token""Forbidden""404 page not found"{
"message": "Request was rejected due to rate limiting. If you want more, please contact contact@siliconflow.cn. Details:TPM limit reached.",
"data": "string"
}{
"code": 50505,
"message": "Model service overloaded. Please try again later.",
"data": "string"
}"string"