Return source file metadata for a file ID.
Endpoint
GET /agents/file/{file_id}
Returns 200 and source file metadata. The response shape differs from the source file list and upload response: it uses bytes, Unix-second timestamps, and an object field.
Path parametersfile_idstring (required)Source file IDThere is no source file content download endpoint. | Request example |
Response fieldsidstringSource file IDobject stringSource file object type, fixed as filebytes integerFile size in bytescreated_at integerCreation time in Unix secondsfilename stringFile namestatus stringFile status: uploaded, processed, or error. processed means the file is usable; uploaded means it is uploaded and undergoing content moderation; error means processing failed or content moderation did not pass | Response example |
Error codes
| HTTP status | Error type / code | Solution |
|---|---|---|
401 | authentication_error / invalid_api_key | Send a valid Authorization: Bearer $DASHSCOPE_API_KEY header |
404 | not_found_error / not_found_error | Use a source file ID that exists in the current workspace |
500 | server_error / server_error | Retry later. If it keeps failing, submit a ticket with x-request-id |