Copy Store
Copy a store into a new store without re-parsing or re-embedding anything.
Copies a store into a new store with the given name. The copy keeps every file, its metadata and its indexed chunks; nothing is parsed or embedded again. The request returns 202 Accepted with the new store right away and the copy runs in the background: the new store's status is in_progress until it completes, and both stores report progress in copy_state. Neither store accepts file changes while the copy runs, and the source must have no files still being processed.
The SDKs ship a copy_and_poll / copyAndPoll helper that starts the copy and waits until the new store leaves in_progress. See Copy Store.
Errors
Besides 422 for an invalid request, a copy fails before it starts with:
| Status | When |
|---|---|
409 | The source is already part of a copy, still has files being processed, or lives in a different storage bucket than new stores of your organization; or the name is already taken |
403 | Your plan's store limit is reached, or a scope-restricted API key gives the copy other tags |
ApiKeyAuthAuthorizationBearer <token>Api key to access Mixedbreads API
store_identifier*|The ID or name of the store to copy
application/json- body
Name and optional overrides for the copy
name*NameName for the copy. Can only contain lowercase letters, numbers, periods (.), and hyphens (-).
1 <= length <= 128description?|Description of the copy; defaults to the source store's description
metadata?|Metadata for the copy; defaults to the source store's metadata
tags?array<string>|Tags for the copy; defaults to the source store's tags
The new store; its contents arrive in the background
application/json- response
Model representing a store with its metadata and timestamps.
id*IdUnique identifier for the store
name*NameName of the store
1 <= length <= 128description?|Detailed description of the store's purpose and contents
is_public?Is PublicWhether the store can be accessed by anyone with valid login credentials
falselicense?|License for public stores
metadata?|Additional metadata associated with the store
tags?array<string>Tags for organizing stores
config?|Store-level configuration defaults
bucket_id?|Customer bucket backing this store's storage; null = platform default
file_counts?Counts of files in different states
expires_after?|Optional expiration policy
status?StoreStatusProcessing status of the store
"completed""expired""in_progress""completed""failed"created_at*Created AtTimestamp when the store was created
date-timeupdated_at*Updated AtTimestamp when the store was last updated
date-timelast_active_at?|Timestamp when the store was last used
usage_bytes?Usage BytesTotal storage usage in bytes
0usage_tokens?Usage TokensTotal storage usage in tokens
0expires_at?|Optional expiration timestamp for the store
copy_state?|Set while the store is being copied from or into, and when a copy into it failed
object?ObjectType of the object
"store"from mixedbread import Mixedbread
mxbai = Mixedbread(api_key="YOUR_API_KEY")
copy = mxbai.stores.copy(
store_identifier="my-knowledge-base",
name="my-store-copy",
)
print(copy)
{
"id": "vs_def456",
"name": "my-store-copy",
"description": "Product documentation",
"is_public": false,
"metadata": {},
"tags": [],
"file_counts": {
"pending": 0,
"in_progress": 0,
"cancelled": 0,
"completed": 0,
"failed": 0,
"total": 0
},
"expires_after": null,
"status": "in_progress",
"copy_state": {
"role": "target",
"status": "in_progress",
"peer_store_id": "vs_abc123",
"started_at": "2024-01-20T14:30:00Z",
"error": null
},
"created_at": "2024-01-20T14:30:00Z",
"updated_at": "2024-01-20T14:30:00Z",
"last_active_at": "2024-01-20T14:30:00Z",
"usage_bytes": 0,
"expires_at": null,
"object": "store"
}