Helium Logo
GET/api/v1/public/files/{file_id}

Get File Content

Download a specific file. You can retrieve either JSON metadata with inline content or raw file bytes.

Request

curl -X GET \
"https://api.he2.ai/api/v1/public/files/thread_456:/workspace/index.html?project_id=proj_123&thread_id=thread_456" \
-H "X-API-Key: he-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

Path Parameters

ParameterTypeDescription
file_idstring (required)File ID (format: thread_id:/workspace/filename)

Query Parameters

ParameterTypeDescription
project_idstring (required)Project ID
thread_idstring (required)Thread ID
downloadboolean (optional)Return raw bytes if true (default: false)

Response (JSON)

{
"success": true,
"file": {
"file_id": "thread_456:/workspace/index.html",
"file_name": "index.html",
"file_size": 2048,
"file_type": "text/html",
"included_inline": true,
"content": "<!DOCTYPE html>...",
"encoding": "utf-8"
}
}

Note: When download=true, the response will be the raw file content (binary or text) instead of JSON.