{"id":"bytesize-add","version":"1.0.0","description":"Add non-negative integer byte-size terms in mixed IEC units and return the exact sum in a chosen unit.","supported_operations":["bytesize add","add binary byte sizes","sum kibibyte amounts"],"unsupported_operations":["SI kB/MB/GB","bits","signed byte sizes","more than 32 terms","subtract byte sizes"],"semantics":["terms is an array of 1 to 32 objects, each with a non-negative canonical integer value and a byte-size unit.","Units are exactly B, KiB, MiB, GiB, TiB using the BYTE_SIZE table (powers of 1024).","Each term is converted to bytes as a BigInt and those amounts are summed.","If the byte sum exceeds 1000 digits, the call is rejected.","The byte sum is converted to the to unit as a reduced canonical rational.","Input -0 is canonicalized to 0; other negatives, SI decimal prefixes, and bit units are rejected."],"limits":{"max_digits":1000,"max_terms":32,"units":["B","KiB","MiB","GiB","TiB"]},"pricing":{"status":"unpriced","charge_usd":null},"input_schema":{"type":"object","additionalProperties":false,"required":["terms","to"],"properties":{"terms":{"type":"array","minItems":1,"maxItems":32,"items":{"type":"object","additionalProperties":false,"required":["value","unit"],"properties":{"value":{"type":"string","pattern":"^-?(0|[1-9][0-9]*)$","maxLength":1001},"unit":{"type":"string","enum":["B","KiB","MiB","GiB","TiB"]}}}},"to":{"type":"string","enum":["B","KiB","MiB","GiB","TiB"]}}},"output_schema":{"type":"object","additionalProperties":false,"required":["numerator","denominator"],"properties":{"numerator":{"type":"string","pattern":"^(0|[1-9][0-9]*)$"},"denominator":{"type":"string","pattern":"^[1-9][0-9]*$"}}},"examples":[{"input":{"terms":[{"value":"1","unit":"KiB"},{"value":"512","unit":"B"}],"to":"B"},"output":{"numerator":"1536","denominator":"1"}}],"execute_url":"/v1/tools/bytesize-add/versions/1.0.0/execute"}