Create a bucket and upload an object
Create a bucket whose schema has aproduct_id string and an image blob:
blobs. auto_process=true creates a batch for the object and submits it in the same call:
Create an object and process it
status: "PENDING". The bucket path accepts the bucket name or its bucket_id. Processing needs at least one collection sourced from the bucket; see Collections and features.
Bucket schema
bucket_schema is required. Its properties map each field name to a type. A field is either metadata, stored on the object and passed through to documents, or a blob, which extractors read.
Use these Mixpeek type names. JSON Schema types such as
keyword are rejected. Each field also takes required, description, enum, default and examples.
An object is checked against the schema when you create it. A field the schema does not declare, or a value of the wrong type, answers 422. A schema with only metadata fields takes objects with no blobs.
A collection maps schema fields to extractor inputs, so name blob fields after what they hold. The standard names (image, video, audio, text) let a collection created with features wire itself to the bucket without an explicit mapping.
Objects and blobs
Each blob inblobs names the schema property it fills and its type, and carries its content in one of two ways:
Inline text. A
text blob takes the text itself in data: "data": "Wireless headphones", or "data": {"text": "Wireless headphones"}. A string that starts with http://, https:// or s3:// is read as a URL. A bare base64 string that decodes to readable text is rejected with a 422; to send encoded text, use "data": "data:text/plain;base64,<encoded_data>". For a bucket whose schema declares title and description as text:
Create an object with inline text
filename and content_type, PUT the file to the returned presigned_url, then confirm the upload. Confirm creates the object for you unless you set create_object_on_confirm: false. The presigned URL is valid for presigned_url_expiration seconds: 3,600 by default, 60 to 86,400.
Other ways in:
POST /v1/buckets/{bucket}/objects/batchcreates up to 100 objects in one call.- A sync copies files from S3, GCS, Azure, Google Drive and other stores into the bucket and keeps it current.
- Streams, databases and the web covers RTSP cameras, warehouses, RSS and similar sources.
content_hash). Identical bytes give the same hash regardless of filename or path, and changed bytes give a new one.
Content hash (checksum)
Content hash (checksum)
Every blob carries
details.hash as sha256:<hex>. Send checksum on a blob to set it yourself; a bare 64-character hex string is normalized to sha256:<hex>, and a malformed value answers 422. Leave it out and the platform computes the hash for inline text on write and for every object a storage sync brings in. Objects written before content addressing existed can carry details.hash: null, which means the hash was never computed.Blob with a pinned checksum
Storage class
Storage class
Set
storage_class on bucket create or update to choose the cost tier objects are written with. It applies to objects a storage sync writes; direct object creates and presigned uploads do not set it, and existing objects keep their tier.Object states
An object’sstatus says where processing stands.
PENDING covers both an object no batch has picked up and one inside a running batch. The object’s last_batch_id names the batch that last processed it; get that batch to see its status and failures. Treat any other object status as still processing.
Look an item up by your own id with a filter on the object list:
Look up an object by product_id
results has object_id, status, error, document_count, created_at and updated_at. document_count stays 0 until a collection has processed the object. Combined with a retriever read, an item is in one of four states:
A retriever read alone cannot tell “never submitted” from “not ready”, because both return an empty list. The object lookup can. To read every document made from one object across all collections, call
GET /v1/objects/{object_id}/documents.
Duplicates and idempotency
Each create makes a new object, even when its fields match an object you created before. Two creates of one item give two objects, two processing charges, and a retriever read that returns the documents of both. Pick one of these to prevent it:idempotency_key protects a retry that follows the first call. Two creates with the same key sent at the same moment can both succeed, so use a unique key when creates can race. A deleted object does not match either key; a create after a delete makes a fresh object.
Unique keys and policies
Setunique_key when you create the bucket. You cannot add or change it later. fields names one or more scalar schema fields; with several, all must match (for example ["sensor_id", "timestamp"]). Every object must carry a non-empty value for each.
?policy= on the create call wins over the bucket’s default_policy. With neither, the create answers 400.
A unique key also makes reprocessing idempotent. With one, documents get deterministic ids, so triggering a collection again overwrites them. Without one, documents get random ids and a second trigger creates duplicates.
Batches
A batch submits objects to the bucket’s collections. It is created inDRAFT, then submitted, queued, and run.
A collection trigger does no splitting. Over a large bucket its single batch runs as one job with a fixed worker ceiling and a 24-hour deadline, so it under-parallelizes and can time out. Use bulk-submit instead:
collection_ids to process every collection sourced from the bucket, plus collections downstream of them.
Reprocessing and dedup strategy
dedup_strategy decides what happens to objects the target collection already has documents for. It is scoped to the (bucket, collection) pair.
skip does not delete documents a re-run no longer produces, such as extra chunks left after a chunking change that yields fewer chunks. Use replace for a clean rebuild. An organization whose documents are protected from re-extraction gets a 409 naming the reason for replace or force.
When a source file changes, its hash changes. The next batch or sync reprocesses that object and rebuilds the documents derived from it, and skips objects whose hash did not change.
Sizing and concurrency
Each batch runs as its own job. A job adds about one CPU worker per 500 objects up to a per-job ceiling, so 16,000 to 20,000 objects saturate one job. Larger batches do not run faster, and smaller ones each pay a cluster cold start and queue behind your concurrency limit.chunk_size defaults to 1,000, accepts up to 50,000, and is clamped to your plan’s maximum batch size. Price a batch before submitting it with estimate cost, which runs the submit calculation without charging.
Submission is accept-and-queue. Batches past your concurrency limit wait as QUEUED and start as running batches finish, highest priority first, then oldest. Priority comes from your plan (Enterprise 9, Scale and Team 7, Build and Pro 6, Free 4). Batches submitted with submit-all run at priority 2, so a backfill created as drafts and submitted that way stays behind new uploads from a sync. A running batch is never pre-empted.
Batch limits by plan
Batch limits by plan
Submission answers
429 only when a queue is full. Each running job has a 24-hour execution deadline. See Limits and billing.Automatic recovery
Automatic recovery
- Failed tasks retry 3 times with exponential backoff.
- Work from a worker that dies mid-task goes to another worker.
- Sweeps every 1 to 10 minutes re-drive orphaned, stuck or stalled batches with bounded retries and mark the rest failed.
- Batches that failed on transient errors retry hourly, up to 3 times, with 1, 2 and 4 hour backoff.
FAILED or COMPLETED_WITH_ERRORS until you fix the cause and resubmit.Backfill plus new uploads
Backfill plus new uploads
Most libraries need a one-time backfill and a steady trickle of new files, against the same bucket and collection. Run the backfill with bulk-submit, or a sync with
sync_mode: "initial_only". Feed new files with a continuous sync or auto_process per upload. A backfill fills your concurrent-batch slots, and a new upload waits for a free slot even at higher priority, so keep the backfill in chunks small enough that slots free up often.For a latency target on single uploads, Mixpeek can keep warm processing capacity running for your account. There is no API for it; ask your account team, with expected uploads per hour and target processing time.Check a batch and handle errors
GET /v1/buckets/{bucket}/batches/{batch_id} returns the batch status, per-tier progress, documents_written, failed_object_count and error_summary. /failed-documents lists every failed object with its error. Pass webhook_url on submit to get a POST when the batch reaches COMPLETED, FAILED or CANCELED.
A batch that ends COMPLETED_WITH_ERRORS is a work list: read the failed documents, fix the cause, and resubmit. Before a large run, create the batch_failed, batch_stalled and batch_error_rate alerts so a failure reaches you without polling. Monitoring and troubleshooting covers deeper batch diagnosis.
Related
- Object storage and syncs: keep a bucket in step with S3, GCS, Azure and other stores
- Collections and features: turn objects into documents
- Retrievers: read documents back
- Create object API and Create bucket API

