Clay Geospatial Embeddings
Run the Clay geospatial foundation model locally over satellite/aerial imagery in Backblaze B2, write the embeddings back to B2, and search the archive for similar scenes with k-NN — with B2 credentials only and no second API key.
Built for: Geospatial AI teams — climate-tech, agricultural analytics, and government remote sensing — who need rich semantic embeddings over large imagery archives for change detection, land-cover classification, and scene retrieval.

What it's built with
Each piece of the stack, and the job it does in this project.
- Next.js 16
- Web app (App Router)
- React + TypeScript
- Frontend UI
- Tailwind CSS v4 + shadcn/ui
- Design system
- TanStack Query
- Data fetching
- FastAPI (Python 3.12)
- Backend API
- Clay v1.5 foundation model
- Geospatial embeddings engine
- PyTorch
- Local model runtime (CUDA / Apple MPS / CPU)
- rasterio
- GeoTIFF reading & metadata
- usearch
- k-NN similarity index
- boto3
- S3-compatible B2 client
- Backblaze B2
- Object storage for imagery, embeddings & job records
Core capabilities
What the project does out of the box, before you write any code of your own.
Embedding Jobs
Create, run, edit, and delete named jobs that embed a set of B2 imagery tiles with Clay. Records persist as JSON in B2 — no database.
Local Clay embeddings
Clay's own foundation model runs on-device (autodetect CUDA to Apple MPS to CPU) and writes .npy embeddings back to B2, using local compute only.
Imagery Library
A scoped GeoTIFF gallery over the imagery/ prefix with PNG thumbnails and parsed geospatial metadata (CRS, bounds, bands, GSD).
Similarity search
Pick a tile, embed it, and retrieve the nearest scenes with a usearch k-NN index over the embeddings stored in B2.
Full-bucket file browser + direct upload
The reusable B2 scaffolding kept from the starter kit — browse the whole bucket and upload straight to B2.
Layered FastAPI backend
A strict types to config to repo to service to runtime architecture with structural tests and agent-optimized docs.
A closer look
More screens from the running project.




Choose it for the right job
Clay Geospatial Embeddings is a head start for a specific shape of project, not a supported, general-purpose product.
Use it when
- You want to embed a satellite/aerial imagery archive with a real geospatial foundation model running on your own hardware.
- You want every artifact — imagery, tiles, embeddings, and job records — kept in your own B2 bucket over the S3-compatible API.
- You need scene-similarity retrieval (k-NN) over the embeddings you generate.
- You want a dependable, tested scaffold to start from instead of a blank prototype.
Choose another path when
- You need a complete hosted product — there's no managed hosting, user accounts, authentication, tenant isolation, or billing.
- You expect production imagery out of the box — the synthetic seed set is a reproducible demo; production archives are your own.
- You need published-fidelity Clay inputs — the per-band normalization presets are reflectance-scale approximations; swap in claymodel's own metadata for production.
- Your imagery isn't geospatial — for general image corpora, OpenCLIP Batch Embeddings is a closer fit.
Project status and support
Community support only via the repository's GitHub Issues — no SLA is provided for the sample software.