ILC Agent API

Source-backed workflows for agents that need current public records and location context.

Start with location-pulse

Check an address or state for current NWS alerts, FEMA declarations, and Census geocoding.

$0.15 USDC via x402 on Base mainnet.

{"address":"1600 Pennsylvania Ave NW, Washington, DC","limit":10}

Property pulse

Combine municipal property records with current weather and disaster context.

$0.15 USDC via x402 on Base mainnet.

{"county_or_zip":"78701","address":"1600 Congress Ave","limit":10}

Provider area pulse

Check NPPES provider identity and CMS hospital context for the provider's area.

$0.15 USDC via x402 on Base mainnet.

{"npi":"1679576722","limit":10}

Standalone context tool

Read or save user-confirmed context to help an AI adapt without claiming to know the whole story. Use an opaque subject ID, never a name or email. Context operations require the integrating app's tenant bearer key in addition to x402 payment.

Read/save/update: $0.05 USDC. Budget recovery: $0.15 USDC. Erase, deletion, opt-out, and structured feedback: free.

Status: Setup required: configure the dedicated context PostgreSQL database and context secrets.

Save only after the person confirms the memory. Budget recovery asks what changed after a missed plan and does not store budget numbers or free-text explanations.

See OpenAPI or capabilities for request schemas.

How payment works

  1. POST one workflow.
  2. Receive the x402 payment challenge.
  3. Sign and submit the USDC payment with an x402-capable wallet.
  4. Retry the same request with the payment proof.

Location-pulse response shape

Illustrative schema only: every angle-bracket value below is a placeholder, not live source data or proof of a completed paid call.

{
  "status": "success",
  "workflow": "location_weather_plus_disaster_pulse",
  "data": {
    "location": {
      "address": "<requested US address>",
      "matched_address": "<Census geocoder match>",
      "state": "<two-letter state code>",
      "coordinates": {
        "latitude": 0.0,
        "longitude": 0.0
      }
    },
    "weather_alerts": [
      {
        "id": "<NWS alert URL or ID>",
        "event": "<alert event>",
        "headline": "<alert headline>",
        "severity": "<severity>",
        "effective": "<ISO-8601 timestamp>",
        "expires": "<ISO-8601 timestamp>",
        "area_desc": "<affected area>"
      }
    ],
    "disaster_declarations": [
      {
        "disasterNumber": "<FEMA disaster number>",
        "state": "<two-letter state code>",
        "declarationTitle": "<declaration title>",
        "declarationDate": "<YYYY-MM-DD>"
      }
    ],
    "snapshot_id": "<stable snapshot ID>",
    "changed": null
  },
  "sources": [
    {
      "name": "U.S. Census Bureau Geocoder",
      "url": "https://geocoding.geo.census.gov/geocoder/locations/onelineaddress",
      "retrieved_at": "<ISO-8601 UTC timestamp>",
      "last_updated": null,
      "freshness": "retrieved_at_request",
      "verification_status": "primary_source"
    },
    {
      "name": "National Weather Service",
      "url": "https://api.weather.gov/alerts/active",
      "retrieved_at": "<ISO-8601 UTC timestamp>",
      "last_updated": null,
      "freshness": "retrieved_at_request",
      "verification_status": "primary_source"
    },
    {
      "name": "FEMA OpenFEMA Disaster Declarations",
      "url": "https://www.fema.gov/api/open/v2/DisasterDeclarationsSummaries",
      "retrieved_at": "<ISO-8601 UTC timestamp>",
      "last_updated": null,
      "freshness": "retrieved_at_request",
      "verification_status": "primary_source"
    }
  ],
  "retrieved_at": "<ISO-8601 UTC timestamp>",
  "warning": "ILLUSTRATIVE SCHEMA ONLY \u2014 every angle-bracket value is a placeholder, not live source data. Live results are not a guarantee that an area is safe or free of unreported events.",
  "freshness": "retrieved_at_request",
  "verification_status": "source_backed",
  "coverage": {},
  "warnings": [],
  "next_actions": []
}

For a repeat check, send the returned data.snapshot_id as previous_snapshot with changes_only: true. An unchanged snapshot returns empty lists for the monitored records.

{"address":"1600 Pennsylvania Ave NW, Washington, DC","limit":10,"previous_snapshot":"<data.snapshot_id>","changes_only":true}

Test the payment offer without paying

This unpaid request should return HTTP 402 with the x402 payment challenge. It confirms the offer only; it does not retrieve records or prove a paid response.

curl -i --max-time 30 -X POST https://ilc-x402-api-1.onrender.com/api/v1/workflows/location-pulse -H 'content-type: application/json' --data '{"address":"1600 Pennsylvania Ave NW, Washington, DC","limit":10}'

One-call TypeScript client

Install the official x402 client packages and viem; see the x402 buyer guide for Python, Go, and other client options.

npm install @x402/fetch @x402/core @x402/evm viem

This signs at most $0.15 per payment on Base mainnet. The cap is per payment, not a daily or lifetime budget. Use a dedicated funded wallet, apply your own cumulative spend limit, and store EVM_PRIVATE_KEY in a runtime secret manager—not in prompts or source code.

import { wrapFetchWithPayment, x402HTTPClient } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const privateKey = process.env.EVM_PRIVATE_KEY;
if (!privateKey) throw new Error("Set EVM_PRIVATE_KEY in your runtime secret store.");
const signer = privateKeyToAccount(privateKey as `0x${string}`);

const client = x402Client.fromConfig({
  schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(signer) }],
  spendControls: { maxAmountPerPayment: "$0.15" }
});
const paidFetch = wrapFetchWithPayment(fetch, client);
const x402Http = new x402HTTPClient(client);

const response = await paidFetch(
  "https://ilc-x402-api-1.onrender.com/api/v1/workflows/location-pulse",
  {
    method: "POST",
    headers: { "content-type": "application/json" },
    body: JSON.stringify({
      address: "1600 Pennsylvania Ave NW, Washington, DC",
      limit: 10
    })
  }
);
const result = await x402Http.processResponse(response);
if (result.paymentStatus !== "settled") {
  throw new Error(`x402 payment status: ${result.paymentStatus}`);
}
if (!response.ok) {
  throw new Error(`ILC HTTP ${response.status}: ${JSON.stringify(result.body)}`);
}
console.log(JSON.stringify(result.body, null, 2));

Agent catalog · Capabilities · x402 manifest · OpenAPI · llms.txt

Responses preserve source URLs, retrieval times, limitations, and upstream status. They are evidence bundles, not legal, medical, safety, or investment determinations.