Your first API call

Start with a simple direct HTTP GET—not an MCP tool call. No API key or wallet is needed while the trial quota remains. Verified against public responses on 2026-11-09.

1. Get the current UTC time

curl -i --max-time 30 \
  'https://time.memoryapi.org/x402/time/current?timezone=UTC'

Expected while quota remains: HTTP 200, Content-Type: application/json, and headers X-Free-Tier-Limit: 2, X-Free-Tier-Remaining: 1 (or 0 after the second call). The response includes success: true, timezone: "UTC", local_datetime, day_of_week, and source: "TimeAPI.io". Time values change; additional fields depend on the upstream provider.

This endpoint currently allows 2 free GET calls per IP, per endpoint, per UTC day. Other endpoints may have different eligibility or configuration. Shared IPs can exhaust a quota; failed upstream calls can consume it. Trust the response headers, not a universal free-tier promise.

2. Inspect HTTP 402 without paying

After quota is exhausted, the same request returns HTTP 402 with a base64 JSON Payment-Required header. A request without payment headers does not spend funds. The JSON body may simply be {}; inspect the header, not just the body.

node --input-type=module -e '
const r = await fetch("https://time.memoryapi.org/x402/time/current?timezone=UTC");
console.log("HTTP", r.status, "remaining", r.headers.get("x-free-tier-remaining"));
const h = r.headers.get("payment-required");
console.log(h ? JSON.parse(Buffer.from(h, "base64").toString("utf8")) : await r.json());
'

The verified 402 advertises x402 version 2, scheme exact, network eip155:8453 (Base mainnet), native USDC asset 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, and amount: "1000" in six-decimal USDC units: $0.001 USDC per paid call. The recipient is 0x24FAcafEB49b4e3FACF0B3e69604A2F4640c9bf2. If those requirements change, inspect them before signing.

3. Optional x402 client (payment requires explicit opt-in)

Use Node.js 20+ in a new local directory. Download the complete client example and inspect it before running:

npm install @x402/[email protected] @x402/[email protected] viem@2
curl --fail --output first-call.mjs https://memoryapi.org/first-call.mjs
node first-call.mjs

Default behavior is non-paying: it makes one ordinary GET and prints the response or public payment requirements. It creates no signature and sends no payment. For a paid request, use a dedicated low-balance wallet holding native USDC on Base, set X402_PRIVATE_KEY securely via your secret manager/environment, and set CONFIRM_X402_PAYMENT=yes. Never put a private key in source code, a URL, a screenshot, or a chat. Do not log signed payment headers.

The payment-enabled part uses the official client:

const client = new x402Client()
  .register('eip155:8453', new ExactEvmScheme(signer));
// The complete file restricts version, scheme, network, USDC asset,
// recipient, and amount to at most 1000 units ($0.001).
const fetchWithPayment = wrapFetchWithPayment(fetch, client);
const response = await fetchWithPayment(url);
With opt-in enabled, the client can sign and automatically retry a 402 request with payment authorization. This is real money. We tested imports, a free GET, and the 402 inspection path—not a funded transaction, settlement, or paid response. No paid transaction was performed.

Direct API prices are endpoint-specific

See the selected endpoint catalog for exact methods, paths, and configured prices. Examples: time/current $0.001, market/quote $0.001, research/arxiv $0.005, legal/search $0.01, token/screen $0.01, wallet/portfolio $0.01, shopping search $0.50, and validator validation $15. These are direct HTTP prices verified in deployed route declarations. The live 402 requirements are authoritative; a listed price is not a guarantee that an upstream provider is available.

MCP: free discovery, important payment limitations

The Streamable HTTP endpoint is https://mcp.memoryapi.org/mcp. The live catalog exposes 13 tools, not 10 or 11; that is a tool count, not a count of all ecosystem services. Initialization and tools/list are free:

curl --max-time 30 'https://mcp.memoryapi.org/mcp' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  --data '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'

Some tools are gated by an MCP-specific 402 response. Those configured gate prices differ from direct HTTP prices—for example search_products advertises $0.10 at the MCP gate while direct shopping search is $0.50; validate_agent advertises $0.50 at the gate while direct validation is $15. Gate prices are not a confirmed total cost or successful-execution promise.

Paid MCP execution is not end-to-end verified. The current proxy does not forward payment authorization to upstream paid APIs, its payment middleware does not implement settlement, and several tool paths differ from deployed direct routes. The MCP 402 is also not the same standard v2 header response used by the direct example above. Do not buy an MCP session pass based on discovery metadata. Use direct HTTP endpoints for paid calls. Merely adding the server URL to a generic MCP client does not establish payment support. MAPI payment acceptance/discounts/staking are not verified by this server.

Tool discovery was checked without invoking any paid MCP operation. Existing tool handlers and payment routes have not been changed by these documentation corrections.