Jump to the manifest
ingest-video-from-s3.namespace.yaml: apply it with one API call, then read the walkthrough below to change it.At a glance
How the pieces connect
Buckets hold what you upload, collections turn it into searchable documents, and retrievers answer queries over the collections.Deploy it
1
Get the manifest
2
Validate it
Validate runs every check apply runs and creates nothing. Fix each entry in
errors, then run it again.3
Apply it
Apply creates every resource in one call. The response lists each resource with its outcome in
wait_for_seed=true also waits until the sample objects are processed, so the first query below has documents to return.resources. Apply refuses a resource that already exists and rolls the whole apply back, so to apply the file again over this namespace add ?mode=create_missing, which creates only what is missing.Run the first query
Look up the namespace id by name, then runs3-video-search. Check status and warnings along with documents: a run that times out still answers 200, with status degraded.
Add your own data
Each object you add to a bucket is processed by every collection that reads it. This adds one object tos3-videos. NAMESPACE_ID is the id from the namespace lookup above.
PENDING until processing finishes, then COMPLETED or FAILED. Buckets and objects covers object states, retries and duplicates.
Retrievers
s3-video-search
Type what a moment shows or what someone says in it, and get the matching segments from every video the sync has ingested.
Stages: feature_search
Searches: video-segments
Collections
Each collection runs one extractor over a bucket, or over another collection’s documents.video-segments
video-segments
multimodal_extractor@v1 over bucket s3-videos: one document per 10-second segment, with a visual embedding and a transcript embedding. Feeds s3-video-search.Reads bucket
s3-videos with multimodal_extractor v1.Inputs: video ← videoCopied onto each document: categoryThe manifest
Every resource above comes from this file. Change it and apply it again with?mode=upsert to update what exists. Manifests documents each field.
ingest-video-from-s3.namespace.yaml
Hand it to an agent
Paste this prompt into Claude Code, Cursor or another coding agent. To give the agent this whole page instead, use Copy page in the menu at the top of the page, or point it at the page’s Markdown athttps://mixpeek.com/docs/templates/ingest-video-from-s3.md.
Prompt
How it works
The manifest declares four parts:- A storage connection holds read access to your S3 bucket. It belongs to the organization, so other namespaces can reuse it.
- A bucket sync watches one S3 prefix through that connection. With
sync_mode: continuousit checks for new files everypolling_interval_secondsand creates one object ins3-videosper new file. - The sync submits each new batch of objects for processing, so
video-segmentsrunsmultimodal_extractoron them with no extra call. Each 10-second segment gets a visual and a transcript embedding. s3-video-searchsearches both embeddings with one text query and fuses the two lists withdbsf.
run_transcription and run_transcription_embedding both default to false; without them the speech search finds nothing. The manifest sets both to true.Connect your S3 bucket
1
Grant read access
Mixpeek needs to list and read objects under your prefix. Object storage has the IAM policy, and the role trust policy if you use a role.
2
Store the keys as organization secrets
The connection reads its keys from
${{ secrets.AWS_ACCESS_KEY_ID }} and ${{ secrets.AWS_SECRET_ACCESS_KEY }}, so the manifest file never holds them. Create both once per organization, with these exact names. This takes an admin API key.cURL
3
Uncomment the connection and the sync
In the manifest, remove the
# in front of the storage_connections: and bucket_syncs: blocks. Set region to your bucket’s region. Set source_path to your bucket name and prefix, written as my-video-bucket/videos/ or s3://my-video-bucket/videos/.4
Apply again
create_missing creates the connection and the sync and leaves everything else as it is.Run the sync now
To start the first run without waiting for the polling interval, look up the sync’s id and trigger it:cURL
healthy is false when the sync is inactive or paused, has consecutive failures, or has not progressed for two of its polling intervals. Files that fail after every retry are counted in dlq_total.
Change what the sync reads
Edit thebucket_syncs entry and apply with ?mode=upsert. Upsert updates source_path, file_filters, polling_interval_seconds, schema_mapping, reconcile and batch_collection_ids. It does not change sync_mode, so choose that before the first apply.
- One-time backfill
- File filters
- Poll less often
initial_only imports what is under the prefix once and then stops. Use it for an archive that does not grow.ingest-video-from-s3.namespace.yaml
Map S3 metadata onto each object
schema_mapping decides what each synced file writes into the bucket object. The published mapping writes the parent folder’s name as category, so videos/household/tide.mp4 gets category: household, which field_passthrough copies onto every segment. Other sources for a field:
ingest-video-from-s3.namespace.yaml
mappings must be a property in the bucket schema, so add campaign and shoot_date to s3-videos as type: string in the same edit. To filter segments on a new field, append it to the collection’s field_passthrough; segments extracted after the change carry it. To filter a run to one folder:
cURL
Use an IAM role instead of keys
A role keeps long-lived keys out of Mixpeek. Replace the connection’scredentials block; its trust policy must allow Mixpeek to assume it with your external_id, as Object storage describes.
ingest-video-from-s3.namespace.yaml
access_key credentials and add endpoint_url to config.
Seed from your own bucket
A seed blob written as{connection, path} reads one object through the connection, which gives you a first query on your own footage at apply time:
ingest-video-from-s3.namespace.yaml
Control cost
Processing costs 0.20 USD per minute of video, for every collection that reads the bucket. The namespace’sbudget.daily_usd pauses new batches once a day’s spend reaches it. Raise it to cover a normal day of new video:
cURL
skip_batch_submission: true on the sync: it creates objects and submits nothing, so nothing is searchable until you trigger the collection.
Other storage providers
The same bucket, sync and collection work with GCS, Azure Blob, R2 and other object stores. Changeprovider and config on the connection; Object storage lists each provider’s config fields. For fusion, moments, reranking and image queries on this kind of collection, see Video understanding.
