Add File to Store
Upload a new file to a store for indexing.
ApiKeyAuthAuthorizationBearer <token>Api key to access Mixedbreads API
store_identifier*|The ID or name of the store
application/json- body
The file to add to the store
metadata?|Optional metadata for the file
config?Configuration for adding the file
external_id?|External identifier for this file in the store
overwrite?OverwriteIf true, overwrite an existing file with the same external_id
truefile_id*File IdID of the file to add
uuidexperimental?|DeprecatedStrategy for adding the file. This field is deprecated. Please use the top-level 'config' field instead. If this is provided, it will override the top-level 'config' field.
The uploaded store file details
application/json- response
Represents a file stored in a store.
id*IdUnique identifier for the file
filename?FilenameName of the file
metadata?|Optional file metadata
external_id?|External identifier for this file in the store
status?JobStatusProcessing status of the file
"pending""pending""in_progress""cancelled""completed""failed"last_error?|Last error message if processing failed
store_id*Store IdID of the containing store
created_at*Created AtTimestamp of store file creation
date-timeversion?|Version number of the file
usage_bytes?|Storage usage in bytes
usage_tokens?|Storage usage in tokens
config?|Configuration for the file
object?ObjectType of the object
"store.file"chunks?array<|||>|chunks
content_url*Content UrlPresigned URL for file content
from mixedbread import Mixedbread
mxbai = Mixedbread(api_key="YOUR_API_KEY")
file = mxbai.stores.files.create(
"my-knowledge-base",
file_id="f47ac10b-58cc-4372-a567-0e02b2c3d479",
metadata={"category": "documentation"},
)
print(file)
{
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"external_id": "ext-doc-001",
"object": "store.file",
"filename": "example_document.pdf",
"metadata": {
"category": "documentation"
},
"status": "in_progress",
"last_error": null,
"store_id": "c3d4e5f6-a7b8-9012-cdef-345678901234",
"usage_bytes": 0,
"usage_tokens": 0,
"config": {
"parsing_strategy": "fast"
},
"version": 1,
"created_at": "2025-01-15T16:00:00.000Z",
"content_url": "https://example.com/files/f47ac10b-58cc-4372-a567-0e02b2c3d479?signature=..."
}