← x402janus

x402janus API Docs

Agent-first wallet security runtime for Base. Start with machine entrypoints, then wire scan + x402 payment handling directly into your automation loop.
OpenAPI spec: GET /api/docs (OpenAPI 3.1.0)
Guided launchpad: /docs/playground

Explore related pages

Agent Entrypoints (Start Here)

PathPurpose
/skill.mdBootstrap instructions for agent runtimes and CLI automation.
/api/skill-mdCanonical markdown manifest with pricing tiers and payment envelope details.
/api/docsOpenAPI 3.1 spec for SDK generation and machine validation.

Quick Start

Run a free agent-safe scan in one call:

curl -s -X POST "https://x402janus.com/api/guardian/scan/0x1234567890abcdef1234567890abcdef12345678?tier=free" | jq .summary

For paid tiers (quick / standard / deep), keep the same request pattern: call once, parse 402 Payment Required , settle x402 USDC payment on Base, and retry with X-PAYMENT.

Base URL

https://x402janus.com

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

Agent runtime paid tiers implement the x402 protocol for per-request micropayments in USDC on Base. Wire this into your request-retry loop:

1
Send request from agent runtime

Call a paid tier endpoint (quick/standard/deep). The server responds with 402 Payment Required.

2
Parse payment envelope

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

3
Sign + settle from payer wallet

Sign and submit the USDC payment payload from your agent payer wallet. The thirdweb SDK can automate this with settlePayment().

4
Retry with proof header

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 Janus scan endpoint
const res = await fetch("https://x402janus.com/api/guardian/scan/0x1234567890abcdef1234567890abcdef12345678?tier=quick", {
  method: "POST",
});

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

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

  // Step 4: Retry with proof
  const data = await fetch("https://x402janus.com/api/guardian/scan/0x1234567890abcdef1234567890abcdef12345678?tier=quick", {
    method: "POST",
    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 tier cost

Pricing

EndpointBase PriceNotes
/api/guardian/scan/{address}?tier=freeFREENo x402 payment
/api/guardian/scan/{address}?tier=quick$0.01 USDCx402
/api/guardian/scan/{address}?tier=standard$0.05 USDCx402
/api/guardian/scan/{address}?tier=deep$0.25 USDCx402
/api/v2/agent/{address}/aliveFREEHealth probe

All prices are in USDC (6 decimals) on Base. Paid calls follow the x402 402 → pay → retry pattern and include settlement proof in X-PAYMENT.

Agent Runtime EndpointsPrimary automation surface

Compatibility EndpointsManual/browser wallet flows

These endpoints remain available for browser and wallet-auth workflows. Agent runtimes should start with /skill.md and prefer the runtime endpoints above.

Janus References

ContractNetworkAddress
$x402JBase Mainnet0x4140573a01232e169bD5A247dee272EfbC60c22F
USDCBase Mainnet0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Treasury SafeBase Mainnet0xA7940a42c30A7F492Ed578F3aC728c2929103E43

x402janus API v2 · Agent Security Runtime on Base · Powered by x402

OpenAPI spec: GET /api/docs