Overview
Retrieve metadata and processing information for one or more files that have been uploaded and confirmed. This endpoint returns the same metadata generated during the confirmation process, allowing you to access file details anytime.Authentication
Request
Request Body
- file_ids array of strings (required) — Array of file IDs (UUIDs) to retrieve metadata for
- user_id string (required) — User ID associated with the files (for access control)
Response
Returns an array of file metadata objects:Field Reference
Each file object contains:- file_id string — UUID of the file
- filename string — Original filename
- file_size number — File size in bytes
- processed_at string — ISO 8601 timestamp when file was processed
- metadata object — File-type-specific metadata (structure varies by file type)
- processing_summary string — Human-readable summary of file contents
Metadata by File Type
CSV Metadata
PDF Metadata
Excel Metadata
Image Metadata
JSON Metadata
Error Responses
File Not Found
404 Not Found
Note: If requesting multiple files and some are not found, only the found files are returned (no error).
No File IDs Provided
400 Bad Request
Authentication Required
401 Unauthorized
Access Denied
403 Forbidden
Note: Users can only access their own files.
Use Cases
1. Display File List in UI
2. Validate Files Before Chat
3. Build Context for Chat
Response Examples
Multiple Files Response
Empty Array (No Files Found)
200 OK
Note: An empty array is returned if none of the requested file IDs are found or accessible.
Best Practices
- Cache metadata: Store metadata locally to avoid repeated requests
- Batch requests: Request metadata for multiple files in a single call
- Error handling: Check for empty arrays or missing files
- User isolation: Always include the correct
user_idfor security - Display summaries: Use
processing_summaryfor user-friendly descriptions
Related Endpoints
- Generate Upload URL - Start the upload process
- Confirm Upload - Process files and generate initial metadata
- Chat Completion API - Use files in chat completions