cURL
curl "https://api.anthropic.com/v1/files/file_011CNha8iCJcU1wXNR6q4V8w/content" \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: files-api-2025-04-14" \
--output downloaded_file.pdf"<string>"下载文件
下载Claude生成文件的内容
GET
/
v1
/
files
/
{file_id}
/
content
cURL
curl "https://api.anthropic.com/v1/files/file_011CNha8iCJcU1wXNR6q4V8w/content" \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: files-api-2025-04-14" \
--output downloaded_file.pdf"<string>"Files API允许您上传和管理文件以与Claude API一起使用,而无需在每次请求时重新上传内容。有关Files API的更多信息,请参阅文件开发者指南。
Files API目前处于测试阶段。要使用Files API,您需要包含测试功能标头:
anthropic-beta: files-api-2025-04-14。请通过我们的反馈表单联系我们,分享您使用Files API的体验。Headers
Optional header to specify the beta version(s) you want to use.
To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.
Path Parameters
ID of the File.
Response
Successful Response
The response is of type string.
Was this page helpful?
⌘I