# Get upload URL Generate a resumable upload URL for large files that exceed the direct upload limit. Returns a signed, resumable upload URL for uploading large files (>31 MB). After uploading the file to the signed URL, call [Register upload](/docs/api-reference/knowledge/register-upload) to add the file to the store and start processing. #### Path Parameters **`organization_id`** string required The unique identifier of the organization (format: `org_*`). **`store_id`** string required The unique identifier of the vector store. #### Request Body **`file_name`** string required The name of the file (1-255 characters). **`file_size`** integer required The file size in bytes (must be greater than 0). **`mime_type`** string required The MIME type of the file. **`relative_path`** string optional A relative path within the store for folder uploads. ## Returns An object containing the upload session URL, recommended chunk size, and expiry time. Request ```bash cURL curl -X POST "https://api.aitronos.com/v1/organizations/org_xyz789/stores/vs_abc123/files/upload-url" \ -H "Authorization: Bearer $ACCESS_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "file_name": "large-dataset.csv", "file_size": 104857600, "mime_type": "text/csv", "relative_path": "data/imports" }' ``` ```python Python SDK from aitronos import Aitronos client = Aitronos(api_key="your-api-key") result = client.knowledge.get_upload_url( organization_id="org_xyz789", store_id="vs_abc123", file_name="large-dataset.csv", file_size=104857600, mime_type="text/csv", relative_path="data/imports", ) print(result) ``` ```python Python import requests org_id = "org_xyz789" store_id = "vs_abc123" url = f"https://api.aitronos.com/v1/organizations/{org_id}/stores/{store_id}/files/upload-url" headers = { "Authorization": "Bearer YOUR_ACCESS_TOKEN", "Content-Type": "application/json", } data = { "file_name": "large-dataset.csv", "file_size": 104857600, "mime_type": "text/csv", "relative_path": "data/imports", } response = requests.post(url, headers=headers, json=data) print(response.json()) ``` ```javascript JavaScript const orgId = "org_xyz789"; const storeId = "vs_abc123"; const response = await fetch( `https://api.aitronos.com/v1/organizations/${orgId}/stores/${storeId}/files/upload-url`, { method: "POST", headers: { Authorization: `Bearer ${accessToken}`, "Content-Type": "application/json", }, body: JSON.stringify({ file_name: "large-dataset.csv", file_size: 104857600, mime_type: "text/csv", relative_path: "data/imports", }), } ); const data = await response.json(); console.log(data); ``` Response ```json 200 OK { "upload_id": "file_abc123def456", "signed_url": "https://storage.googleapis.com/...", "chunk_size": 8388608, "expires_at": "2025-06-15T11:00:00Z" } ``` ```json 404 Error { "success": false, "error": { "code": "VECTOR_STORE_NOT_FOUND", "message": "We couldn't find the requested resource.", "system_message": "Vector store not found", "type": "client_error", "status": 404, "details": { "store_id": "vs_abc123", "organization_id": "org_xyz789" }, "trace_id": "abc-123-def", "timestamp": "2025-06-15T10:00:00Z" } } ``` ## Related Resources - [Upload File](/docs/api-reference/knowledge/upload-file) - [Register Upload](/docs/api-reference/knowledge/register-upload) - [List Files](/docs/api-reference/knowledge/list-files) - [Get File](/docs/api-reference/knowledge/get-file) - [Delete File](/docs/api-reference/knowledge/delete-file) - [Bulk Remove Files](/docs/api-reference/knowledge/bulk-remove) - [Processing Status](/docs/api-reference/knowledge/processing-status) - [Processing Logs](/docs/api-reference/knowledge/processing-logs) - [Retry Processing](/docs/api-reference/knowledge/retry-processing) - [File Config](/docs/api-reference/knowledge/file-config) - [Storage Usage](/docs/api-reference/knowledge/storage-usage)