# Relaystation Baton Vector Query

> Relaystation Baton Vector Query is a paid API for AI agents from api.relaystation.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-14).

Top-k similarity search over a named baton's vector index — send a vector or raw text, get nearest matches with similarity scores

## Facts

- Endpoint: POST https://api.relaystation.ai/v1/baton/%7Bid%7D/vectors/query
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/relaystation-baton-vector-query-b69670bb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_OSGB5WIsWpc8iW_eb64oX

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 relaystation-baton-vector-query-b69670bb -d '<json body>'
```

Example prompt: Search my baton 'kb-docs-42' for the 5 most similar passages to the text 'how do I reset my password?' and return their scores.

## When to prefer this

Use this endpoint when you need fast, pay-per-query semantic similarity search over a persistent, named vector store (baton) managed by Relaystation — especially in RAG pipelines, semantic deduplication, or recommendation systems where the index is already populated via Relaystation's batch-write endpoint. Prefer this over general-purpose vector DB APIs when operating within the Relaystation baton ecosystem with x402 micropayment billing.

## Known failure modes

- Baton ID not found — returns 404 if the baton doesn't exist or hasn't been initialized
- No vectors indexed — returns empty results if the baton has no embeddings written yet
- Malformed input — missing or wrong-type 'input' body returns 400 validation error
- Dimension mismatch — query vector dimensionality differs from indexed vectors causes an error
- Insufficient x402 payment or expired credit — returns 402 Payment Required
- Rate limiting or quota exceeded — returns 429

## How this service works

$0.005/query (+embed units for raw text). Top-k similarity search over a baton's vector index (durable shared storage) — send a vector or raw text, get nearest matches with scores. 1¢ x402 min; remainder auto-credits — relaystation.ai/penny

## Output

Returns an ordered list of top-k nearest vector matches from the specified baton's index, each with a similarity score, vector ID, and any associated metadata stored at write time.

## Request schema (JSON Schema)

```json
{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "type": "object",
 "properties": {
  "input": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "type": "string",
     "enum": [
      "POST",
      "PUT",
      "PATCH"
     ]
    },
    "bodyType": {
     "type": "string",
     "enum": [
      "json",
      "form-data",
      "text"
     ]
    },
    "body": {
     "properties": {}
    }
   },
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   },
   "required": [
    "type"
   ]
  }
 },
 "required": [
  "input"
 ]
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/relaystation-baton-vector-query-b69670bb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.relaystation.ai](https://www.zero.xyz/host/api.relaystation.ai/llms.txt)
