Api key woking locally but not after deployment

You add a key with the exact value you are using.

You enter the value exactly as you want it. abc !== "abc"

If you are using this in front-end code the key will not remain hidden.