Cloudflare Vectorize is a globally distributed vector database for building AI-powered applications. Use the API to create indexes, insert vectors, and perform similarity searches.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/cloudflare/cloudflare-typescript/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Access the Vectorize API:Indexes
Manage vector indexes for similarity search.Create an index
Create a new vector index.Your Cloudflare account ID
Name for the index
Index configuration object
Vector dimensions (e.g., 768 for many embedding models)
Distance metric: ‘cosine’, ‘euclidean’, or ‘dot-product’
Optional description for the index
The index name
The index configuration
ISO 8601 timestamp when the index was created
List indexes
Retrieve all vector indexes in your account.Your Cloudflare account ID
Get an index
Retrieve details about a specific index.The index name
Your Cloudflare account ID
Delete an index
Delete a vector index and all its data.The index name to delete
Your Cloudflare account ID
Vectors
Manage vectors within an index.Insert vectors
Insert vectors into an index.The index name
Your Cloudflare account ID
Array of vector objects to insert (up to 1000 vectors per request)
Unique identifier for the vector
Vector values (must match index dimensions)
Optional metadata to store with the vector (up to 10KB)
Number of vectors successfully inserted
Upsert vectors
Insert or update vectors.The index name
Your Cloudflare account ID
Array of vector objects to upsert
Query vectors
Perform a similarity search.The index name
Your Cloudflare account ID
Query vector (must match index dimensions)
Number of results to return (default: 5, max: 100)
Whether to return vector values (default: false)
Whether to return metadata (default: true)
Metadata filters for the search
Array of matching vectors
The vector ID
Similarity score (interpretation depends on metric)
The vector metadata (if return_metadata=true)
The vector values (if return_values=true)
Get vectors by ID
Retrieve specific vectors by their IDs.The index name
Your Cloudflare account ID
Array of vector IDs to retrieve (up to 100 IDs)
Delete vectors by ID
Delete specific vectors from an index.The index name
Your Cloudflare account ID
Array of vector IDs to delete (up to 1000 IDs)
List vectors
List all vectors in an index.The index name
Your Cloudflare account ID
Maximum number of vectors to return (default: 100, max: 1000)
Pagination cursor for fetching the next page
Index information
Get statistics about an index.Total number of vectors in the index
Vector dimensions
Distance metric used