获取文件信息
API 配置
保存后下方「Try It」面板会自动携带此 API Key 发送真实请求。
Base: api.xrtoken.net
返回单个文件的元数据与 1 小时有效的读取 URL。
Authorization
BearerAuth AuthorizationBearer <token>
API 密钥认证(OpenAI 格式)。在 Authorization 请求头中传入:
Authorization: Bearer tr-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
In: header
Path Parameters
id*string
文件 ID(file- 前缀)
Response Body
application/json
application/json
application/json
curl -X get "https://api.xrtoken.net/v1/files/string"{
"id": "string",
"object": "file",
"bytes": 0,
"created_at": 0,
"filename": "string",
"purpose": "string",
"mime_type": "string",
"type": "image",
"url": "string",
"expires_at": 0
}{
"error": "invalid or missing API key",
"type": "auth_error"
}{
"error": "string",
"type": "invalid_request_error"
}