# Create a vector store div strong 🔨 In Development — This section is still being developed and may change. Create a new vector store for semantic search and RAG (Retrieval Augmented Generation). Vector stores enable semantic search across your documents. Upload files, and the AI can search and reference them in responses. #### Path Parameters **`organization_id`** string required The unique identifier of the organization. #### Request Body **`name`** string required Name of the vector store. **`description`** string optional Description of the vector store's purpose or contents. **`accessMode`** string optional · Defaults to `organization` Access control level: - `public` - Everyone can access - `organization` - All organization members - `department` - Specific departments only - `private` - Only creator and specified users **`accessDepartments`** array optional Department IDs that can access (when `accessMode` is `department`). **`accessUsers`** array optional User IDs that can access (when `accessMode` is `private`). ## Returns A [Vector Store object](/docs/api-reference/objects/vector-store-object). Request ```bash curl -X POST "https://api.freddy.aitronos.com/v1/organizations/org_abc123/vector-stores" \ -H "X-API-Key: $FREDDY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "Product Documentation", "description": "Technical docs for all products", "accessMode": "organization" }' ``` ```python from freddy import FreddyClient with FreddyClient(api_key="your-api-key") as client: store = client.vector_stores.create( organization_id="org_abc123", name="Product Documentation", description="Technical docs for all products", access_mode="organization" ) print(f"Created: {store.name}") print(f"Store ID: {store.id}") ``` ```python import requests response = requests.post( "https://api.freddy.aitronos.com/v1/organizations/org_abc123/vector-stores", headers={ "X-API-Key": api_key, "Content-Type": "application/json" }, json={ "name": "Product Documentation", "description": "Technical docs for all products", "accessMode": "organization" } ) store = response.json() print(f"Store ID: {store['id']}") ``` ## Response 200 OK ```json { "id": "vs_abc123", "name": "Product Documentation", "description": "Technical docs for all products", "organizationId": "org_abc123", "isActive": true, "createdAt": "2025-01-20T15:45:00Z", "updatedAt": "2025-01-20T15:45:00Z", "createdBy": "uid_user123", "accessMode": "organization", "accessDepartments": null, "accessUsers": null, "fileCount": 0, "dataSize": 0 } ``` Errors **400 Bad Request** ```json { "error": { "message": "Name is required", "type": "validation_error", "code": "missing_required_field" } } ``` **401 Unauthorized** ```json { "error": { "message": "Authentication required", "type": "authentication_error", "code": "missing_authentication" } } ``` ## Related Resources - [List Vector Stores](/docs/api-reference/vector-stores/list) - [Retrieve Vector Store](/docs/api-reference/vector-stores/retrieve) - [Update Vector Store](/docs/api-reference/vector-stores/update) - [Delete Vector Store](/docs/api-reference/vector-stores/delete) - [Add File to Vector Store](/docs/api-reference/vector-stores/add-file)