文档
API 文档
Files
获取文件列表

获取文件列表

获取当前用户下所有可用的文件列表

请求地址

GET https://api.stepfun.com/v1/files

请求参数

请求响应

返回File对象列表

示例

from openai import OpenAI
 
client = OpenAI(
  api_key="STEP_API_KEY",
  base_url="https://api.stepfun.com/v1"
)
 
client.files.list()
 
返回
{
  "data": [
    {
      "id": "file-abc123",
      "object": "file",
      "bytes": 175,
      "created_at": 1613677385,
      "filename": "salesOverview.pdf",
      "purpose": "file-extract",
      "status":"success"
    },
    {
      "id": "file-abc123",
      "object": "file",
      "bytes": 140,
      "created_at": 1613779121,
      "filename": "puppy.pdf",
      "purpose": "retrieval",
       "status":"success"
    }
  ],
  "object": "list"
}