Skip to content
extraorbital
Documentation ExtraOrbital
Browse documentation

Data & storage

Vector

Add an index that finds similar embeddings.

Run in your project folder
npx extraorbital add vector --dimensions 1536

Match the dimensions to your embedding model before creating the index.

  1. 01 / Run the commandGet the service
  2. 02 / Read your .envUse its credentials
  3. 03 / Connect your appCall the SDK or API

Limits

LimitFree · PrototypePaid
Indexes5No plan count cap
Storage1 GBUsage billed
Requests10K queries + 10K updates / dayUsage billed
BackupsNoneCharged as storage
Inactive resource30 days after last usePersistent

Free allowances are shared across the account. Provider limits still apply on paid plans.

Use it

search.ts
import { Index } from "@upstash/vector";

const index = Index.fromEnv(); // reads UPSTASH_VECTOR_REST_URL and _TOKEN

await index.upsert({
  id: "doc-42",
  vector: embedding, // number[1536]
  metadata: { title: "Q3 report" },
});

const hits = await index.query({ vector: queryEmbedding, topK: 5, includeMetadata: true });

Environment variables

The CLI writes these to .env or an existing .env.local.

VariablePurpose
UPSTASH_VECTOR_REST_URLIndex HTTP endpoint
UPSTASH_VECTOR_REST_TOKENPrivate index token

Specifics

Options

Terminal
npx extraorbital add vector [--slug <name>] [--dimensions <n>] \
  [--similarity-function <fn>] [--embedding-model <model>] [--region <region>]
FlagDefaultDescription
--slugdefaultA second, fully separate index in the same project
--dimensions1536Vector dimensions, 1–4096. Match your embedding model
--similarity-functionCOSINEOne of COSINE, EUCLIDEAN, DOT_PRODUCT
--embedding-model—Let the index embed raw text for you
--regionus-east-1One of us-east-1, eu-central-1, ap-southeast-1

To change dimensions or similarity method, create a new index and upload the embeddings again:

Terminal
npx extraorbital add vector --slug small --dimensions 384

Embeddings

Generate numeric embeddings with a model and store them in this index. Set --embedding-model if you want the index to embed raw text. Dimensions must match and cannot be changed after creation.

Pricing

UsagePaid rate
Storage$0.25 / GB-mo
Requests$0.40 / 100K

See pricing for team subscription fees, allowances, and billing terms. Plans and billing ↗