API Reference
Upload Document
POST
/api/v1/uploadUpload documents for processing and embedding.
Form Data
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
file | file | Yes | - | PDF, DOCX, or TXT file |
projectId | string | Yes | - | Target project UUID |
Example Request
bash
curl -X POST https://awrag.io/api/v1/upload \
-H "Authorization: Bearer YOUR_TOKEN" \
-F "file=@document.pdf" \
-F "projectId=your-project-uuid"Processing Pipeline:
- File upload validation
- PDF/DOCX text extraction
- Text chunking (200 tokens per chunk, 20-token overlap)
- Batch embedding generation using advanced AI technology
- Vector storage with pgvector
- Status update to 'completed'
Supported File Types:
- PDF (text extraction via multiple parsers)
- DOCX (Word documents)
- TXT (plain text)
File Size Limits:
- Maximum file size: 10 MB
- Maximum document length: ~50,000 words