Returns a list of files.
curl --request GET \
--url https://api.siliconflow.com/v1/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.siliconflow.com/v1/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.siliconflow.com/v1/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 20000,
"message": "Ok",
"status": true,
"data": {
"data": [
{
"id": "file-kkhtqklcnm",
"object": "file",
"bytes": 806,
"created_at": 1741777570,
"filename": "requests-2.jsonl",
"purpose": "batch",
"line_count": 2
}
],
"object": "file"
}
}{
"code": 20012,
"message": "<string>",
"data": "<string>"
}"Invalid token""404 page not found""<string>""<string>"获取文件列表
Returns a list of files.
GET
/
files
Returns a list of files.
curl --request GET \
--url https://api.siliconflow.com/v1/files \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.siliconflow.com/v1/files"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.siliconflow.com/v1/files', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"code": 20000,
"message": "Ok",
"status": true,
"data": {
"data": [
{
"id": "file-kkhtqklcnm",
"object": "file",
"bytes": 806,
"created_at": 1741777570,
"filename": "requests-2.jsonl",
"purpose": "batch",
"line_count": 2
}
],
"object": "file"
}
}{
"code": 20012,
"message": "<string>",
"data": "<string>"
}"Invalid token""404 page not found""<string>""<string>"Authorizations
Query Parameters
Filter files by their purpose
Available options:
batch Maximum number of files to return (default 10)
Required range:
x >= 1