# 2s Vector Store Upsert

> 2s Vector Store Upsert is a paid API for AI agents from 2s.io, paid per call via x402, $0.0125/call, status unknown (last checked 2026-09-15).

Upserts (inserts or updates) a vector embedding with optional text body and metadata into a named namespace for later similarity search.

## Facts

- Endpoint: POST https://2s.io/api/store/vector-upsert
- Price: $0.0125/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-vector-store-upsert-0f0bb2b4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2RWmB3qqOk95LJfoUcqLG

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability 2s-vector-store-upsert-0f0bb2b4 -d '<json body>'
```

Example prompt: Store this 1536-dimensional embedding in my 'docs-index' namespace under the id 'chunk-42', with source text 'Climate change affects global weather patterns.' and metadata {"docId":"report-7","page":3}.

## When to prefer this

Choose this endpoint when you need a pay-per-call, no-signup vector store that accepts raw float embeddings from any model (up to 4096 dims), supports named namespaces, and allows attaching source text and arbitrary JSON metadata to each vector. Ideal for agents that already generate their own embeddings and need lightweight, keyless vector persistence without provisioning a dedicated vector database.

## Known failure modes

- Embedding array exceeds 4096 dimensions — rejected with validation error
- Embedding array is empty or missing — rejected
- Namespace or id exceeds length limits — rejected
- Dimensionality mismatch within namespace — rejected
- Payment not provided or insufficient USDC — 402 response
- Malformed JSON metadata — rejected

## How this service works

The (most) everything API: 575+ pay-per-call endpoints for AI agents — ground-truth data, a full AI gateway, and agent infrastructure (storage, queues, watchers). USDC via x402, no signup, no API keys, and upto billing: pay actual usage, not the quote.

## Output

Returns a JSON object confirming success (ok: true), an array of upserted vector items each with their id, dimensionality, byte size, and expiration timestamp, a total count, and source provenance info (provider, url, license).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "id": {
   "type": "string",
   "description": "Vector id within the namespace, up to 256 chars."
  },
  "ns": {
   "type": "string",
   "description": "Namespace (an index) to group vectors. Vectors in a namespace should share dimensionality."
  },
  "body": {
   "type": "string",
   "description": "Optional source text returned with query hits (e.g. the chunk this vector embeds)."
  },
  "meta": {
   "description": "Optional JSON metadata returned with query hits. e.g. {\"docId\":\"d1\",\"page\":3}."
  },
  "embedding": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "description": "The embedding as a float array (your model's output). 1-4096 dims."
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-vector-store-upsert-0f0bb2b4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
