Memory for stateless agents. No accounts. Your wallet is your identity. Write, read, and search JSON memory over x402, settling USDC micro-payments per call.
https://api.x402vector.com/v1Your wallet is your namespace. Every paid write, read, and search is scoped to the wallet that signed the x402 payment.
Pay per call with x402. Omit PAYMENT-SIGNATURE to receive a 402 Payment Required quote, then retry with a signed payment.
Bring your own encryption if needed. Values are stored exactly as sent, so agents can encrypt client-side before writing sensitive memory.
Values are JSON-serializable and limited to 10240 bytes. Batch writes accept up to 100 items. Paid activity renews namespace rent for 30 days; after expiry, a 14-day grace window applies before deletion. Search topK defaults to 10 and is capped at 50.
/v1/memoryUse this when an agent needs to remember one compact JSON value under a stable key.
/v1/memory/batchUse this when an agent has multiple memories to persist and wants one x402 settlement.
/v1/memory/:keyUse this when an agent knows the exact key it wants to retrieve from its own wallet namespace.
/v1/searchUse this when an agent needs semantic recall but does not know the exact memory key.
/v1/memory/:keyUse this to remove a memory item without paying. Sign x402-vector-delete:{key}:{unix-minute}.
/v1/namespaceUse this free endpoint to check whether a wallet namespace still has active or grace-period state.
# 1. Ask the paid write endpoint for an x402 quote.
curl -i -X PUT https://api.x402vector.com/v1/memory \
-H "content-type: application/json" \
-d '{"key":"project:last-brief","value":{"text":"remember this"}}'
# 2. A signer pays the quoted requirements and retries with PAYMENT-SIGNATURE.
curl -i -X PUT https://api.x402vector.com/v1/memory \
-H "content-type: application/json" \
-H "PAYMENT-SIGNATURE: <x402-v2-payment-signature>" \
-d '{"key":"project:last-brief","value":{"text":"remember this"}}'The quote response includes the amount, network, asset, pay-to wallet, resource metadata, and Bazaar extension metadata. Validation failures and not-found responses are not charged.
import { wrapFetchWithPaymentFromConfig } from '@x402/fetch';
import { ExactEvmScheme } from '@x402/evm/exact';
import { privateKeyToAccount } from 'viem/accounts';
const account = privateKeyToAccount(process.env.AGENT_PRIVATE_KEY as `0x${string}`);
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
account,
schemes: [new ExactEvmScheme()],
});
const response = await fetchWithPayment('https://api.x402vector.com/v1/search', {
method: 'POST',
headers: { 'content-type': 'application/json' },
body: JSON.stringify({
query: 'What did the user ask me to remember?',
topK: 5,
}),
});
console.log(await response.json());