{"openapi":"3.1.0","info":{"title":"Agent Rail API","version":"0.1.0","description":"x402 pay-per-call data endpoints for AI agents: multi-chain reads (Base, Ethereum, Arbitrum, Polygon) and Nigerian reference data. Format/reference validation only — no personal data, no identity-database lookup.","contact":{"url":"https://mainnoltd.com/contact/"},"x-guidance":"Pay-per-call data endpoints for agents: multi-chain reads on Base, Ethereum, Arbitrum and Polygon, plus Nigerian reference data. GET /v1/chain/networks and GET /v1/ng/states are free. Paid routes return HTTP 402 with a machine-readable USDC challenge (x402, eip155:137 or eip155:8453); see /llms.txt for the full manifest."},"x-agentcash-guidance":{"llmsTxtUrl":"https://api.postandshare.net/llms.txt"},"servers":[{"url":"https://api.postandshare.net"}],"paths":{"/v1/ng/phone/lookup":{"get":{"summary":"Validate a Nigerian phone number: carrier, line type, E.164 normalisation","security":[],"parameters":[{"name":"number","in":"query","required":true,"schema":{"type":"string","description":"Nigerian phone number, e.g. 08031234567, +2348031234567 or 2348031234567"},"description":"Nigerian phone number, e.g. 08031234567, +2348031234567 or 2348031234567"}],"x-example":{"number":"08031234567"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.003","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}},"post":{"summary":"Validate a Nigerian phone number (JSON body: {\"number\": \"08031234567\"})","security":[],"parameters":[{"name":"number","in":"query","required":true,"schema":{"type":"string","description":"Nigerian phone number, e.g. 08031234567, +2348031234567 or 2348031234567"},"description":"Nigerian phone number, e.g. 08031234567, +2348031234567 or 2348031234567"}],"x-example":{"number":"08031234567"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.003","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}}},"/v1/ng/bank/validate":{"get":{"summary":"Validate a Nigerian NUBAN account number against its bank code","security":[],"parameters":[{"name":"bank_code","in":"query","required":true,"schema":{"type":"string","description":"3-digit CBN bank code, e.g. 058"},"description":"3-digit CBN bank code, e.g. 058"},{"name":"account_number","in":"query","required":true,"schema":{"type":"string","description":"10-digit NUBAN account number"},"description":"10-digit NUBAN account number"}],"x-example":{"bank_code":"058","account_number":"0123456789"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.003","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}},"post":{"summary":"Validate a Nigerian NUBAN (JSON body: {\"bank_code\":\"058\",\"account_number\":\"0123456789\"})","security":[],"parameters":[{"name":"bank_code","in":"query","required":true,"schema":{"type":"string","description":"3-digit CBN bank code, e.g. 058"},"description":"3-digit CBN bank code, e.g. 058"},{"name":"account_number","in":"query","required":true,"schema":{"type":"string","description":"10-digit NUBAN account number"},"description":"10-digit NUBAN account number"}],"x-example":{"bank_code":"058","account_number":"0123456789"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.003"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.003","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}}},"/v1/ng/identity/format":{"get":{"summary":"Format-validate a Nigerian NIN / BVN / TIN / CAC number (no data lookup)","security":[],"parameters":[{"name":"type","in":"query","required":true,"schema":{"type":"string","enum":["NIN","BVN","TIN","CAC_RC","CAC_BN"],"description":"Which number type"},"description":"Which number type"},{"name":"value","in":"query","required":true,"schema":{"type":"string","description":"The number to check"},"description":"The number to check"}],"x-example":{"type":"NIN","value":"12345678901"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.002","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}},"post":{"summary":"Format-validate a Nigerian identity number (JSON: {\"type\":\"NIN\",\"value\":\"...\"})","security":[],"parameters":[{"name":"type","in":"query","required":true,"schema":{"type":"string","enum":["NIN","BVN","TIN","CAC_RC","CAC_BN"],"description":"Which number type"},"description":"Which number type"},{"name":"value","in":"query","required":true,"schema":{"type":"string","description":"The number to check"},"description":"The number to check"}],"x-example":{"type":"NIN","value":"12345678901"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.002","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}}},"/v1/chain/block-number":{"get":{"summary":"Current block number on Base, Ethereum, Arbitrum or Polygon","security":[],"parameters":[{"name":"network","in":"query","required":false,"schema":{"type":"string","enum":["base","ethereum","arbitrum","polygon"],"description":"Chain to read: base (default), ethereum, arbitrum, polygon"},"description":"Chain to read: base (default), ethereum, arbitrum, polygon"}],"x-example":{"network":"base"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.001","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}},"post":{"summary":"Current block number (JSON body: {\"network\":\"base\"})","security":[],"parameters":[{"name":"network","in":"query","required":false,"schema":{"type":"string","enum":["base","ethereum","arbitrum","polygon"],"description":"Chain to read: base (default), ethereum, arbitrum, polygon"},"description":"Chain to read: base (default), ethereum, arbitrum, polygon"}],"x-example":{"network":"base"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.001","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}}},"/v1/chain/balance":{"get":{"summary":"Native-token balance of an EVM address, with a USD value","security":[],"parameters":[{"name":"network","in":"query","required":false,"schema":{"type":"string","enum":["base","ethereum","arbitrum","polygon"],"description":"Chain to read (default base)"},"description":"Chain to read (default base)"},{"name":"address","in":"query","required":true,"schema":{"type":"string","description":"0x-prefixed EVM address"},"description":"0x-prefixed EVM address"}],"x-example":{"network":"base","address":"0x4200000000000000000000000000000000000006"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.001","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}},"post":{"summary":"Native balance (JSON: {\"network\":\"base\",\"address\":\"0x...\"})","security":[],"parameters":[{"name":"network","in":"query","required":false,"schema":{"type":"string","enum":["base","ethereum","arbitrum","polygon"],"description":"Chain to read (default base)"},"description":"Chain to read (default base)"},{"name":"address","in":"query","required":true,"schema":{"type":"string","description":"0x-prefixed EVM address"},"description":"0x-prefixed EVM address"}],"x-example":{"network":"base","address":"0x4200000000000000000000000000000000000006"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.001","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}}},"/v1/chain/gas":{"get":{"summary":"Current gas price plus the cost of a plain native transfer, in token and USD","security":[],"parameters":[{"name":"network","in":"query","required":false,"schema":{"type":"string","enum":["base","ethereum","arbitrum","polygon"],"description":"Chain to read (default base)"},"description":"Chain to read (default base)"}],"x-example":{"network":"base"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.001","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}},"post":{"summary":"Gas price (JSON body: {\"network\":\"base\"})","security":[],"parameters":[{"name":"network","in":"query","required":false,"schema":{"type":"string","enum":["base","ethereum","arbitrum","polygon"],"description":"Chain to read (default base)"},"description":"Chain to read (default base)"}],"x-example":{"network":"base"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.001","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}}},"/v1/chain/block":{"get":{"summary":"Block header by number or latest: timestamp, tx count, gas used, base fee","security":[],"parameters":[{"name":"network","in":"query","required":false,"schema":{"type":"string","enum":["base","ethereum","arbitrum","polygon"],"description":"Chain to read (default base)"},"description":"Chain to read (default base)"},{"name":"number","in":"query","required":false,"schema":{"type":"string","description":"Block number, or \"latest\" (default)"},"description":"Block number, or \"latest\" (default)"}],"x-example":{"network":"base","number":"latest"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.001","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}},"post":{"summary":"Block header (JSON: {\"network\":\"base\",\"number\":\"latest\"})","security":[],"parameters":[{"name":"network","in":"query","required":false,"schema":{"type":"string","enum":["base","ethereum","arbitrum","polygon"],"description":"Chain to read (default base)"},"description":"Chain to read (default base)"},{"name":"number","in":"query","required":false,"schema":{"type":"string","description":"Block number, or \"latest\" (default)"},"description":"Block number, or \"latest\" (default)"}],"x-example":{"network":"base","number":"latest"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.001","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}}},"/v1/chain/tx":{"get":{"summary":"Transaction receipt by hash: status, block, gas used, fee in token and USD","security":[],"parameters":[{"name":"network","in":"query","required":false,"schema":{"type":"string","enum":["base","ethereum","arbitrum","polygon"],"description":"Chain to read (default base)"},"description":"Chain to read (default base)"},{"name":"hash","in":"query","required":true,"schema":{"type":"string","description":"0x-prefixed 64-hex transaction hash"},"description":"0x-prefixed 64-hex transaction hash"}],"x-example":{"network":"base","hash":"0xc17841526ac00d89ae1d907ec4809a7b8c9db797ab26242c7d13215f9bad787a"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.001","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}},"post":{"summary":"Transaction receipt (JSON: {\"network\":\"base\",\"hash\":\"0x...\"})","security":[],"parameters":[{"name":"network","in":"query","required":false,"schema":{"type":"string","enum":["base","ethereum","arbitrum","polygon"],"description":"Chain to read (default base)"},"description":"Chain to read (default base)"},{"name":"hash","in":"query","required":true,"schema":{"type":"string","description":"0x-prefixed 64-hex transaction hash"},"description":"0x-prefixed 64-hex transaction hash"}],"x-example":{"network":"base","hash":"0xc17841526ac00d89ae1d907ec4809a7b8c9db797ab26242c7d13215f9bad787a"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.001","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}}},"/v1/chain/token":{"get":{"summary":"ERC-20 token metadata and a holder balance (symbol, name, decimals, amount)","security":[],"parameters":[{"name":"network","in":"query","required":false,"schema":{"type":"string","enum":["base","ethereum","arbitrum","polygon"],"description":"Chain to read (default base)"},"description":"Chain to read (default base)"},{"name":"token","in":"query","required":true,"schema":{"type":"string","description":"0x-prefixed ERC-20 contract address"},"description":"0x-prefixed ERC-20 contract address"},{"name":"holder","in":"query","required":true,"schema":{"type":"string","description":"0x-prefixed wallet address"},"description":"0x-prefixed wallet address"}],"x-example":{"network":"base","token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","holder":"0x4200000000000000000000000000000000000006"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.001","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}},"post":{"summary":"ERC-20 balance (JSON: {\"network\":\"base\",\"token\":\"0x...\",\"holder\":\"0x...\"})","security":[],"parameters":[{"name":"network","in":"query","required":false,"schema":{"type":"string","enum":["base","ethereum","arbitrum","polygon"],"description":"Chain to read (default base)"},"description":"Chain to read (default base)"},{"name":"token","in":"query","required":true,"schema":{"type":"string","description":"0x-prefixed ERC-20 contract address"},"description":"0x-prefixed ERC-20 contract address"},{"name":"holder","in":"query","required":true,"schema":{"type":"string","description":"0x-prefixed wallet address"},"description":"0x-prefixed wallet address"}],"x-example":{"network":"base","token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","holder":"0x4200000000000000000000000000000000000006"},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]},"x-x402":{"scheme":"exact","price":"$0.001","networks":["eip155:137","eip155:8453"],"payTo":"0x53Ee9314a0799464503C539F243906742edB84B6"},"responses":{"200":{"description":"Result"},"402":{"description":"Payment required (x402)"}}}},"/v1/ng/states":{"get":{"summary":"List Nigerian states and capitals (free)","security":[],"responses":{"200":{"description":"Result"}}}},"/v1/chain/networks":{"get":{"summary":"List supported chains and chain ids (free)","security":[],"responses":{"200":{"description":"Result"}}}}}}