下载 Thread 文件内容
下载已准备好的 Thread 附件或 Agent artifact 的字节内容。该文件必须属于 API token 调用方可见的公开 Thread。
GET
/files/{fileId}/content下载已准备好的 Thread 附件或 Agent artifact 的字节内容。该文件必须属于 API token 调用方可见的公开 Thread。
Authorization
publicApiBearer AuthorizationBearer <token>
使用 Authorization: Bearer msp_...。Project API key 只能配置、执行和访问本 Project 的 Agent、Session 和文件。密钥和账号管理需要 console 或 CLI 登录。旧账号 token 已被拒绝。
In: header
Path Parameters
fileId*string
添加或列出 Thread 文件时返回的文件 ID。v1 ID 是不带前缀的 ULID。
Match
^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$Format
ulidQuery Parameters
disposition?string
控制 Content-Disposition 响应头。下载时使用 attachment,可预览内容使用 inline。
Default
"attachment"Value in
- "attachment"
- "inline"
Response Body
application/octet-stream
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/files/01J0000000000000000000000J/content?disposition=attachment""string"{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}{ "error": { "code": "agent_not_published", "message": "string" }}