Comment the header {} on your code:
const response = await fetch(YOUR_API_SRC, {
method: 'POST',
// headers: {
// // 'Content-Type': 'application/json',
// },
// body: JSON.stringify({ input: inputValue }),
body: JSON.stringify({ "input": { "message": inputValue} }),
});
Why header {} causing issue?
Frontend fetching dont need header {}, usually uses for server (and backend configurations)