Skip to main content
Reference vendor/cloudflare 2 min read

api

Vectorize API routes

Fetch the relevant section of the Workers binding API before writing calls or types.

TaskCurrent documentation
Vector shape, binding, and generated TypeScript typesVectorize API
Insert, upsert, retrieve by ID, delete, or inspect an indexOperations
Query by vector or ID; choose returned metadata, values, and scoring precisionQuery vectors and query options
Filter by metadata, combine conditions, or use nested propertiesMetadata filtering
Batch ingestion and select vector formatsInsert vectors and current limits
Manage indexes or vectors outside a WorkerWrangler commands and REST API

Operation choices

  • Choose insert when existing IDs should be preserved; choose upsert when they should be replaced. Upsert replaces the whole vector, including metadata, so provide the complete intended record.
  • Request only the values and metadata the caller needs. Indexed metadata can omit fields or truncate strings; full metadata and vector values change query limits and latency. Fetch the current query options before choosing a result count.
  • Treat accepted mutations and query visibility as separate events. Use current mutation guidance when implementing ingestion verification or read-after-write behavior.