{"id":"ipv4-prefix-for-hosts","version":"1.0.0","description":"Compute the smallest IPv4 CIDR block (largest prefix length) whose usable host capacity meets a required count.","supported_operations":["ipv4 prefix for hosts","subnet size for host count","minimal ipv4 prefix for hosts"],"unsupported_operations":["IPv6","VLSM planning across multiple subnets"],"semantics":["usable_hosts is a JSON integer from 0 to 4294967294.","Usable capacity follows RFC 3021: /32 has 1 usable host, /31 has 2, /0-/30 reserve network+broadcast so usable = 2^(32-prefix) - 2.","prefix is the largest prefix length (smallest block) whose usable capacity is >= usable_hosts."],"limits":{"usable_hosts_min":0,"usable_hosts_max":4294967294},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["usable_hosts"],"properties":{"usable_hosts":{"type":"integer","minimum":0,"maximum":4294967294}}},"output_schema":{"type":"object","additionalProperties":false,"required":["prefix","netmask","usable_host_count","total_count"],"properties":{"prefix":{"type":"integer","minimum":0,"maximum":32},"netmask":{"type":"string","maxLength":15},"usable_host_count":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"total_count":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"}}},"examples":[{"input":{"usable_hosts":60},"output":{"prefix":26,"netmask":"255.255.255.192","usable_host_count":"62","total_count":"64"}}],"execute_url":"/v1/tools/ipv4-prefix-for-hosts/versions/1.0.0/execute"}