How do I add input a value to a Craft/Twig request?
You can't.

The Craft / Twig code runs server-side, before the page is delivered to the browser. The JavaScript runs client side, after the page is delivered to the browser.