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 parameters
| Field | Required | Type | Description |
|---|---|---|---|
file_id | Yes | string | Source file ID |
Request example
Response example
Response fields
| Field | Type | Description |
|---|---|---|
id | string | Source file ID |
object | string | Source file object type, fixed as file |
bytes | integer | File size in bytes |
created_at | integer | Creation time in Unix seconds |
filename | string | File name |
status | string | File 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 |
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 |