获取用户模型列表
Retrieve models information.
Query Parameters
typestring
The type of models
Value in
"text" | "image" | "audio" | "video"sub_typestring
The sub type of models. You can use it to filter models individually without setting type.
Value in
"chat" | "embedding" | "reranker" | "text-to-image" | "image-to-image" | "speech-to-text" | "text-to-video"Response Body
Successful response
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"