# Add file to vector store div strong 🔨 In Development — This section is still being developed and may change. Attach an uploaded file to a vector store for semantic search. Add a previously uploaded file to a vector store. The file will be processed and indexed for semantic search. #### Path Parameters **`organization_id`** string required The unique identifier of the organization. **`vector_store_id`** string required The unique identifier of the vector store. #### Request Body **`fileId`** string required The ID of the file to add to the vector store. ## Returns A confirmation response with the file association details. Request ```bash curl -X POST "https://api.freddy.aitronos.com/v1/organizations/org_abc123/vector-stores/vs_abc123/files" \ -H "X-API-Key: $FREDDY_API_KEY" \ -H "Content-Type: application/json" \ -d '{"fileId": "file_abc123"}' ``` ```python from freddy import FreddyClient with FreddyClient(api_key="your-api-key") as client: result = client.vector_stores.add_file( organization_id="org_abc123", vector_store_id="vs_abc123", file_id="file_abc123" ) print(f"Added file to vector store") ``` ```python import requests response = requests.post( "https://api.freddy.aitronos.com/v1/organizations/org_abc123/vector-stores/vs_abc123/files", headers={ "X-API-Key": api_key, "Content-Type": "application/json" }, json={"fileId": "file_abc123"} ) ``` ## Response 200 OK ```json { "vectorStoreId": "vs_abc123", "fileId": "file_abc123", "status": "processing", "addedAt": "2025-01-20T16:15:00Z" } ``` Errors **404 Not Found** ```json { "error": { "message": "File or vector store not found", "type": "not_found_error", "code": "resource_not_found" } } ``` **400 Bad Request** ```json { "error": { "message": "File already exists in vector store", "type": "validation_error", "code": "duplicate_file" } } ``` ## Related Resources - [List Files in Vector Store](/docs/api-reference/vector-stores/list-files) - [Remove File from Vector Store](/docs/api-reference/vector-stores/delete-file) - [Upload File](/docs/api-reference/files/upload)