{"uid":"cap_l6DBLPNorzdrwxHBxruS4","slug":"subnet-cidr-calculator-e14e7501","name":"Subnet CIDR Calculator","description":"Decision-grade security/due-diligence outcome reports ($20-$100) plus deterministic paid utilities ($0.001+) for software agents and automated workflows.","url":"https://api.bakhour.ca/subnet/calculate","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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["cidr"],"properties":{"cidr":{"type":"string"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"cidr":"192.168.1.0/24","version":4,"num_addresses":256,"prefix_length":24,"network_address":"192.168.1.0","broadcast_address":"192.168.1.255"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_maRViJJj3yG96cQ_A5t5z","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Calculates subnet details (network address, broadcast address, prefix length, number of addresses) for a given CIDR block","exampleAgentPrompt":"Can you calculate the subnet details for the CIDR block 10.0.0.0/16 — I need the network address, broadcast address, prefix length, and total number of IP addresses?","exampleUseCases":[{"title":"Network planning for cloud VPC","prompt":"I'm setting up a VPC and need to know how many IP addresses are available in 10.0.0.0/20 — also tell me the network and broadcast address for that block."},{"title":"Validating firewall rule subnets","prompt":"Before I write this firewall rule, can you break down 172.16.0.0/12 for me? I need the network address, broadcast address, and total address count."},{"title":"Classroom subnetting exercise","prompt":"What are the subnet details for 192.168.100.0/26 — specifically the prefix length, number of addresses, network address, and broadcast address?"}],"resultDescription":"Returns a JSON object containing the input CIDR string, IP version (4 or 6), total number of addresses in the block, prefix length, network address, and broadcast address.","failureModes":["Missing or malformed 'cidr' query parameter returns an error","Invalid CIDR notation (e.g. out-of-range prefix or malformed IP) may return a 400 or error response","Payment not included or insufficient triggers a 402 Payment Required response","IPv6 CIDR blocks may behave differently or be unsupported depending on server implementation"],"whenToPreferThis":"Choose this endpoint when you need a quick, deterministic, paid computation of subnet metadata from a CIDR block without standing up your own networking library. Ideal for automated infrastructure workflows, network planning agents, or validation pipelines that need broadcast/network addresses and address counts on demand.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:33:21.176Z","isFirstParty":false}