Get a contract ABI, verified source status and proxy implementation on Base or Ethereum.
Returns the verified ABI, contract name, compiler, function selectors and event topics from Sourcify, and follows proxies (EIP-1967 and others) to the implementation and its ABI. For unverified contracts, function selectors are read from the bytecode and named from the public OpenChain signature database. No explorer API key needed.
$0.0025 per call in USDC on Base via x402, or pay by card with prepaid credits (2 credits) · 1 free call per caller · no signup · Verified on PayAPI Market (one settled test payment by PayAPI Market: $0.002 on GET /api/contract-abi, 2026-10-25, tx; not an audit or uptime guarantee)
GET https://freetier-agent-api.pages.dev/api/contract-abi
Use contract-abi when an agent needs to call or decode a contract it has not seen before. Use wallet-profile for balances and account type, and token-risk to check an ERC-20 for dangerous privileges.
| Name | Type | Description |
|---|---|---|
address required | string | contract address 0x... |
chain | string (base | ethereum) | default base |
abi | string (true | false) | include full ABI JSON (default true) |
{
"chain": "base",
"verified": true,
"match": "exact_match",
"contractName": "FiatTokenProxy",
"functions": [
{
"selector": "0xf851a440",
"signature": "admin()"
}
],
"proxy": {
"isProxy": true,
"implementation": "0x2ce6311ddae708829bc0784c967b7d77d19fd779",
"implementationName": "FiatTokenV2_2",
"implementationVerified": true
}
}
curl -s "https://freetier-agent-api.pages.dev/api/contract-abi?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base"
Buy a credit pack on Gumroad (1,000 credits $3), then send your license key. The X-Credits-Remaining response header shows your balance; failed calls are not charged.
curl -s "https://freetier-agent-api.pages.dev/api/contract-abi?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base" \ -H 'X-License-Key: YOUR-LICENSE-KEY'
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPaymentFromConfig } from "@x402/fetch";
import { ExactEvmScheme } from "@x402/evm";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.EVM_PRIVATE_KEY); // wallet with USDC on Base
const fetchWithPayment = wrapFetchWithPaymentFromConfig(fetch, {
schemes: [{ network: "eip155:8453", client: new ExactEvmScheme(account) }],
});
const res = await fetchWithPayment("https://freetier-agent-api.pages.dev/api/contract-abi?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base");
console.log(await res.json());
# pip install "x402[httpx,evm]" eth-account
import asyncio, os
from eth_account import Account
from x402 import x402Client
from x402.http.clients import x402HttpxClient
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
async def main():
client = x402Client()
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
async with x402HttpxClient(client) as http:
r = await http.get("https://freetier-agent-api.pages.dev/api/contract-abi?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913&chain=base")
print(r.json())
asyncio.run(main())
A bare request without parameters returns the HTTP 402 payment challenge (x402 v2 in the PAYMENT-REQUIRED header, v1 in the body). Invalid input gets a 400 before any payment.
Failed calls are never charged. Failed calls are never charged: the payment is verified first, the request runs, and the payment is settled only if it succeeded. Errors (4xx/5xx) are not settled, and invalid input is rejected before any payment or free call.
Independent monitoring of this endpoint: 402index service page (health, 30-day uptime, p50 latency).
contract_abi at https://freetier-agent-api.pages.dev/mcp (Streamable HTTP; in-band x402 payment via _meta["x402/payment"], or card credits via the X-License-Key header)Agent Extraction API by FreeTier Kits · Terms · llms.txt · /.well-known/x402 · MCP: https://freetier-agent-api.pages.dev/mcp · Contact: tec@mail.grokbot.com
This site and its texts were written with AI assistance and reviewed for accuracy; example outputs are real responses from the API.