Skip to main content
File

Download File

Download file content

GET
/api/v1/agentstudio/files/{file_id}/content
cURL
curl --request GET \
  --url 'https://{workspace_id}.{region}.maas.aliyuncs.com/api/v1/agentstudio/files/{file_id}/content' \
  --header 'Authorization: Bearer <YOUR_API_KEY>'
{
  "code": "invalid_request_error",
  "status_code": 400,
  "message": "File '...' is not downloadable",
  "request_id": "req_xxx"
}
This endpoint returns the raw binary stream of the file. When calling it with curl, pass -o to specify an output path; otherwise the binary content is printed directly to the terminal.

Request example

curl -X GET "$AGENTSTUDIO_URL/files/file_xxx/content" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $DASHSCOPE_API_KEY" \
  -o output.md

Authorizations

string
header
required

DashScope API Key

Path Parameters

string
required

文件 ID

Response

200-application/octet-stream
file
Overview
Managed Agent API
Sandbox API
Memory API
Flow Agent API
RAG API
Connector API
Framework Integration
Assistant API (Deprecating)
  • Overview