# VectorWay Chat Completions

> VectorWay Chat Completions is a paid API for AI agents from api.vectorway.io, paid per call via x402, $0.101838/call, status unknown (last checked 2026-09-15).

OpenAI-compatible chat completions backed by Gemini 2.5 models with optional vector memory, paid per-request via USDC over x402 with no account required.

## Facts

- Endpoint: POST https://api.vectorway.io/v1/chat/completions
- Price: $0.101838/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/api-vectorway-io-6b45e5b5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap__2VgbrzoDA1hwkytfUd70

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 api-vectorway-io-6b45e5b5 -d '<json body>'
```

Example prompt: Ask the Gemini 2.5 Flash model: 'What are the key differences between transformer and diffusion architectures?' — pay per token from my wallet, and store the conversation in my wallet's memory namespace so future calls can recall it.

## When to prefer this

Choose this endpoint when you need OpenAI-compatible LLM chat completions without account registration, want to pay per-token in USDC via x402 (ideal for autonomous agents with crypto wallets), need wallet-scoped persistent vector memory so context carries across sessions, or want access to Gemini 2.5 Flash/Pro quality at pay-as-you-go pricing. Prefer it over API-key-based services when deploying agent workflows that must self-fund requests and maintain memory without a backend.

## Known failure modes

- 402 payment required if no valid x402 USDC payment header is provided
- insufficient USDC balance causes payment failure and request rejection
- invalid or malformed messages array returns 400 bad request
- unsupported model name returns an error indicating available Gemini model variants
- wallet signature verification failure rejects the payment and the request
- token limit exceeded on input context returns an appropriate error
- vector memory write/recall failure may degrade response quality without hard error

## How this service works

Pay-per-call OpenAI-compatible chat completions backed by Gemini 2.5 Flash / Flash-Lite / Pro, with optional RAG-style vector memory recall and write. No account needed — pay USDC over x402 per request. Buyer wallet from the signed payment is the memory namespace, so calls from the same wallet share context. Billed per input + output token. The 402 challenge authorizes an upper bound; settlement drops to actual usage.

## Output

Returns an OpenAI-compatible chat completion response object containing one or more assistant message choices, token usage breakdown (input + output tokens billed), finish reason, and model identifier. If vector memory recall was enabled, relevant past context from the same wallet's memory namespace is injected into the response context automatically.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "enum": [
    "gemini-2.5-flash",
    "gemini-2.5-flash-lite",
    "gemini-2.5-pro"
   ],
   "type": "string",
   "description": "Gemini tier — billed by real input/output token counts at a fixed discount off Vertex list. Flash-Lite is the cheapest (~3x under Flash), Flash is the balanced default, Pro is the deep- reasoning tier (~4x Flash on input, ~4x on output)."
  },
  "messages": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "role",
     "content"
    ],
    "properties": {
     "role": {
      "enum": [
       "system",
       "user",
       "assistant"
      ],
      "type": "string"
     },
     "content": {
      "type": "string"
     }
    }
   },
   "minItems": 1,
   "description": "OpenAI-style chat transcript. Roles are system, user, assistant. The full transcript is sent to Gemini on every call; persistent recall across calls is handled by the optional vector memory below, not by us replaying past messages."
  },
  "memory_read": {
   "type": "boolean",
   "description": "When true, semantically search the buyer's wallet-scoped vector memory before generation and splice the top-k matches into the prompt as RAG context. Memory is partitioned by payer wallet, so successive x402 calls from the same wallet share the same memory namespace."
  },
  "temperature": {
   "type": "number",
   "maximum": 2,
   "minimum": 0,
   "description": "Gemini sampling temperature."
  },
  "memory_write": {
   "type": "boolean",
   "description": "When true, persist a summary of the request+response into the wallet's vector memory after the call returns. Future calls with memory_read=true will find it via similarity search."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "usage": {
   "memory_read": true,
   "memory_write": true,
   "memories_used": 3
  },
  "output_text": "Here are the highlights from the meeting..."
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/api-vectorway-io-6b45e5b5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vectorway.io](https://www.zero.xyz/host/api.vectorway.io/llms.txt)
