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
| Parameter | Type | Description |
|---|---|---|
file_id | string (required) | File ID (format: thread_id:/workspace/filename) |
Query Parameters
| Parameter | Type | Description |
|---|---|---|
project_id | string (required) | Project ID |
thread_id | string (required) | Thread ID |
download | boolean (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.