{"uid":"cap_FmVAE3MEupk82h7broofP","slug":"fastx402-lab-cidr-calculator-e6c549d5","name":"FastX402 Lab CIDR Calculator","description":"FastX402 Lab: small pay-per-call tools for AI agents, paid per request in USDC on Base over x402. No signup, no API key.","url":"https://lab.fastx402.tools/cidr-calc?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["cidr"],"properties":{"ip":{"type":"string","description":"Optional IPv4 address to test for membership in the block"},"cidr":{"type":"string","description":"IPv4 CIDR block, e.g. 10.0.0.0/22 (prefix 0-32)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"ip":{"type":"string"},"cidr":{"type":"string"},"prefix":{"type":"integer"},"netmask":{"type":"string"},"network":{"type":"string"},"wildcard":{"type":"string"},"broadcast":{"type":"string"},"ip_inside":{"type":"boolean"},"last_host":{"type":"string"},"first_host":{"type":"string"},"usable_hosts":{"type":"integer"}}}}}}},"responseSchema":{"type":"json","example":{"ip":"10.0.3.255","cidr":"10.0.0.0/22","prefix":22,"netmask":"255.255.252.0","network":"10.0.0.0","wildcard":"0.0.3.255","broadcast":"10.0.3.255","ip_inside":true,"last_host":"10.0.3.254","first_host":"10.0.0.1","usable_hosts":1022}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_C2CUOITX7Zfob7OCmFybZ","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes IPv4 CIDR block details (network, broadcast, netmask, usable hosts, etc.) and optionally checks whether a given IP address falls within the block","exampleAgentPrompt":"Can you calculate all the subnet details for 10.0.0.0/22 — I need the network address, broadcast, netmask, first and last host, and how many usable hosts there are? Also check whether 10.0.3.255 is inside that block.","exampleUseCases":[{"title":"Subnet planning for cloud VPC","prompt":"I'm setting up a VPC and need to know how many usable hosts fit in a 10.0.0.0/22 block — can you give me the full breakdown including netmask, broadcast, and first and last host addresses?"},{"title":"IP membership check for firewall rule","prompt":"Is 192.168.1.45 inside the 192.168.1.0/24 subnet? I need to know before I write this firewall rule."},{"title":"Network audit documentation","prompt":"I need subnet details for 172.16.0.0/20 — network address, broadcast, netmask, wildcard mask, and total usable hosts — so I can document our network layout."}],"resultDescription":"Returns a JSON object containing: the original CIDR and prefix length, network address, broadcast address, netmask, wildcard mask, first usable host, last usable host, total usable host count, and (if an IP was provided) a boolean indicating whether that IP falls within the subnet.","failureModes":["Invalid or malformed CIDR notation returns an error (e.g. missing prefix, prefix out of 0-32 range)","Non-IPv4 CIDR formats (IPv6) are not supported","Malformed IP address in the optional membership check causes an error","Missing required 'cidr' query parameter results in a validation error","Payment failure or insufficient USDC balance returns HTTP 402"],"whenToPreferThis":"Choose this endpoint when you need instant, pay-per-call IPv4 subnet calculations without API key registration. It is ideal for AI agents that require on-demand CIDR arithmetic as part of a network planning, auditing, or firewall configuration workflow, especially when USDC micropayment billing over x402 is preferred over subscription APIs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-17T12:30:08.458Z","isFirstParty":false,"canonicalSlug":"fastx402-lab-cidr-calculator-e6c549d5"}