# VectorCache Semantic Cache Lookup

> VectorCache Semantic Cache Lookup is a paid API for AI agents from vectorcache-production.up.railway.app, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-10).

Performs a semantic similarity lookup in a Redis-backed vector cache, returning a cached result on hit or optionally storing a new vector on miss, before hitting expensive embedding pipelines.

## Facts

- Endpoint: POST https://vectorcache-production.up.railway.app/vector/cache?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/vectorcache-semantic-cache-lookup-4e603d5a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Aszxz2XVMK936opw4lEFI

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 vectorcache-semantic-cache-lookup-4e603d5a -d '<json body>'
```

Example prompt: Before calling the embedding model, check the vector cache under namespace 'customer-support' for the query 'how do I reset my password?' and store the embedding on a cache miss.

## When to prefer this

Choose this endpoint when you need to avoid redundant, expensive embedding API calls across a multi-agent system and want a shared, low-latency semantic cache. It is ideal when agents frequently encounter semantically similar (but not identical) queries and you want deduplication before hitting an LLM or embedding pipeline. Prefer it over building your own Redis vector layer when you need a managed, ready-to-use solution with namespace isolation for different agent teams or topics.

## Known failure modes

- Redis backend unavailable — falls back to in-memory cache, may return stale or cold results
- Invalid or mismatched vector dimensions cause storage failure on miss
- Namespace not found returns empty result set treated as a miss
- Malformed query string or missing required 'query' field returns a 400-level error
- Payment failure via x402 protocol results in 402 response blocking the call

## How this service works

High-speed semantic vector cache for multi-agent swarms. Redis-backed similarity lookup with in-memory fallback before expensive embedding pipelines.

## Output

Returns whether the query was a cache hit or miss, and on a hit, provides the semantically similar cached result (including similarity score and matched content). On a miss with storeOnMiss enabled, acknowledges storage of the provided vector for future lookups.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "query": {
   "type": "string",
   "description": "Text to look up in the semantic cache"
  },
  "vector": {
   "type": "array",
   "items": {
    "type": "number"
   },
   "description": "Optional embedding to store on miss"
  },
  "namespace": {
   "type": "string"
  },
  "storeOnMiss": {
   "type": "boolean"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/vectorcache-semantic-cache-lookup-4e603d5a/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from vectorcache-production.up.railway.app](https://www.zero.xyz/host/vectorcache-production.up.railway.app/llms.txt)
