Documentation Index
Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
Use this file to discover all available pages before exploring further.
GET /v1/files/{file_id}/content
Returns a download URL for the file. The server returns a time-limited presigned URL that the client can use to download the file content directly.
Path parameters
| Parameter | Type | Required | Description |
|---|
file_id | string | Yes | File unique identifier with the file_ prefix |
| Header | Required | Description |
|---|
Authorization | Yes | Bearer $QODER_PAT |
Example request
# Get the download URL (do not follow redirects)
curl -X GET "https://openapi.qoder.sh/api/v1/cloud/files/file_019e3bb9b0c2752688aeb5fdacf00565/content" \
-H "Authorization: Bearer $QODER_PAT"
# Follow the redirect to download the file content
curl -L -o output.txt \
-X GET "https://openapi.qoder.sh/api/v1/cloud/files/file_019e3bb9b0c2752688aeb5fdacf00565/content" \
-H "Authorization: Bearer $QODER_PAT"
Example response
HTTP 302 Found
The server returns an HTTP 302 redirect. The response body contains the presigned URL information:
{
"expires_at": "2026-05-18T16:34:52Z",
"url": "https://qoder-cloud-agents-storage-test.oss-ap-southeast-1-internal.aliyuncs.com/files/..."
}
The Location response header also contains the same download URL.
Response fields
| Field | Type | Description |
|---|
url | string | Presigned download URL |
expires_at | string | URL expiration time (ISO 8601), typically about 1 hour after the request |
Notes on the download URL
- The presigned URL is time-limited; request a new URL after expiration.
- The URL contains a
response-content-disposition parameter so browsers trigger a download with the original filename.
- Use
curl -L to automatically follow the redirect and download the file.
Errors
| HTTP | Type | Trigger |
|---|
| 401 | – | Missing or invalid authentication token |
| 403 | permission_error | File purpose does not allow downloads (only tool_output and skill_output are downloadable) |
| 404 | not_found_error | File with the given ID does not exist |
Error response examples
403 — purpose restricted
{
"error": {
"message": "Only files with purpose 'tool_output' or 'skill_output' can be downloaded.",
"type": "permission_error"
},
"type": "error"
}
404 — file not found
{
"error": {
"message": "File 'file_nonexistent123' was not found.",
"type": "not_found_error"
},
"type": "error"
}
See Errors for the full error envelope.