← agent-pulse

API Documentation

On-chain liveness signals for AI agents on Base.
Machine-readable spec: GET /api/docs (OpenAPI 3.1.0)

Quick Start

Check if an agent is alive in one curl:

curl -s "https://agent-pulse-nine.vercel.app/api/v2/agent/0xYOUR_AGENT_ADDRESS/alive" | jq

The /alive endpoint is free, instant, and needs no authentication. For deeper analytics (reliability, streaks, uptime), v2 endpoints use x402 micropayments — your first call gets a 402 with payment instructions; pay with USDC on Base and retry.

Base URL

https://agent-pulse-nine.vercel.app

All paths below are relative to this base. Responses are JSON with Content-Type: application/json. CORS is enabled on all endpoints.

Rate Limits

TierLimitDetails
Free (unauthenticated)60 req / minPer IP, sliding window. Exceeding returns 429 with Retry-After header.
Paid (x402)UnlimitedEvery request with a valid X-PAYMENT header bypasses rate limits entirely.

Rate-limit headers are included on every response:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 58
X-RateLimit-Reset: 1738901260

x402 Payment Flow

Paid endpoints implement the x402 protocol for per-request micropayments in USDC on Base. Here's how it works:

1
Request without payment

Call any paid endpoint normally. The server responds with 402 Payment Required.

2
Read payment requirements

The 402 response includes the X-PAYMENT-REQUIRED header with: amount, USDC token address, network (Base), and facilitator address.

3
Complete payment on-chain

Sign and submit the USDC payment to the facilitator contract on Base. The thirdweb SDK handles this automatically with settlePayment().

4
Retry with proof

Re-send the original request with the X-PAYMENT header containing base64-encoded payment proof. The server verifies and returns data.

Example: TypeScript with thirdweb

import { createThirdwebClient } from "thirdweb";
import { facilitator, settlePayment } from "thirdweb/x402";

const client = createThirdwebClient({ clientId: "YOUR_CLIENT_ID" });

// Step 1: Call the endpoint
const res = await fetch("https://agent-pulse-nine.vercel.app/api/v2/agent/0xAGENT/reliability");

if (res.status === 402) {
  // Step 2: Read payment requirements
  const paymentReq = res.headers.get("X-PAYMENT-REQUIRED");

  // Step 3: Settle payment
  const proof = await settlePayment(client, JSON.parse(paymentReq));

  // Step 4: Retry with proof
  const data = await fetch("https://agent-pulse-nine.vercel.app/api/v2/agent/0xAGENT/reliability", {
    headers: { "X-PAYMENT": proof },
  }).then(r => r.json());

  console.log(data);
}

Freshness Pricing

Paid endpoints use dynamic pricing based on data freshness:

FreshnessMultiplierWhen
Real-time1.5×Cache age = 0 (fresh data direct from chain)
Cached0.5×Cache age ≤ 1 hour (recently computed)
Base1.0×Default price

Pricing

EndpointBase PriceCache TTL
/v2/agent/*/aliveFREE30 s
/v2/agent/*/reliability$0.01 USDC5 min
/v2/agent/*/streak-analysis$0.008 USDC5 min
/v2/agent/*/uptime-metrics$0.01 USDC15 min
/api/pulse (POST)Dynamic

All prices are in USDC (6 decimal places) on Base L2. Payments are processed by the x402 facilitator.

Free EndpointsNo authentication required

Contract Addresses

ContractNetworkAddress
PulseRegistryBase Mainnet0xe61C615743A02983A46aFF66Db035297e8a43846
USDCBase Mainnet0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
USDCBase Sepolia0x036CbD53842c5426634e7929541eC2318f3dCF7e