Skip to main content

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

ParameterTypeRequiredDescription
file_idstringYesFile unique identifier with the file_ prefix

Headers

HeaderRequiredDescription
AuthorizationYesBearer $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

FieldTypeDescription
urlstringPresigned download URL
expires_atstringURL 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

HTTPTypeTrigger
401Missing or invalid authentication token
403permission_errorFile purpose does not allow downloads (only tool_output and skill_output are downloadable)
404not_found_errorFile 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.