GET
/
openai
/
v1
/
files
/
{file_id}
查询文件
curl --request GET \
  --url https://api.ppinfra.com/openai/v1/files/{file_id} \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>'
{
  "id": "<string>",
  "object": "<string>",
  "bytes": 123,
  "filename": "<string>",
  "created_at": 123,
  "expires_at": 123,
  "purpose": "<string>",
  "metadata": {
    "total_requests": 123
  }
}
根据文件 ID 查询指定文件的详细信息。

请求头

Content-Type
string
required
枚举值: application/json
Authorization
string
required
Bearer 身份验证格式,例如:Bearer {{API 密钥}}。

路径参数

file_id
string
required
要查询的文件唯一标识符。

响应

id
string
required
文件的唯一标识符。
object
string
required
对象类型,恒为 file
bytes
integer
required
文件大小(字节)。
filename
string
required
文件名。
created_at
integer
required
文件创建时的 Unix 时间戳(秒)。
expires_at
integer
文件到期的 Unix 时间戳(秒)。仅对输出文件返回。
purpose
string
required
文件的用途。可用用途:
  • batch - 批处理的输入文件
  • batch_output - 批处理的输出文件
metadata
object
required
关于该文件的附加元数据。