Files
Convert files to memories
Changed onUpload files (PDF, DOCX, etc.), convert them to markdown, and retain as memories.
This endpoint handles file upload, conversion, and memory creation in a single operation.
Features:
- Supports PDF, DOCX, PPTX, XLSX, images (parser-dependent OCR), audio (with transcription)
- Automatic file-to-markdown conversion using pluggable parsers
- Files stored in object storage (PostgreSQL by default, S3 for production)
- Each file becomes a separate document with optional metadata/tags
- Always processes asynchronously — returns operation IDs immediately
The system automatically:
- Stores uploaded files in object storage
- Converts files to markdown
- Creates document records with file metadata
- Extracts facts and creates memory units (same as regular retain)
Use the operations endpoint to monitor progress.
Request format: multipart/form-data with:
- files: One or more files to upload
- request: JSON string with FileRetainRequest model
Parser selection:
- Set parser in the request body to override the server default for all files.
- Set parser inside a files_metadata entry for per-file control.
- Pass a list (e.g. ['iris', 'markitdown']) to define an ordered fallback chain — each parser is tried in sequence until one succeeds.
- Falls back to the server default (HINDSIGHT_API_FILE_PARSER) if not specified.
- Only parsers enabled on the server may be requested; others return HTTP 400.
post/v1/default/banks/{bank_id}/files/retain
Request
- Base URLhttps://hindsight.vectorize.io (the document declares no server; this is the origin it was published from)
- Authnone declared
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
bank_idstring required
Headers
authorizationstring nullable
Request body multipart/form-data
Response
Successful Response
Example response
{
"operation_ids": [
"550e8400-e29b-41d4-a716-446655440000",
"550e8400-e29b-41d4-a716-446655440001",
"550e8400-e29b-41d4-a716-446655440002"
]
}Changes
- warning
removed the optional property
//from the response with the status
- warning
- info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- info