Help with passing KMVariable with Curl

Hi! I've tried different ways of passing a KM variable "test to the curl script. But all results in error. I appreciate any suggestions for changes.
I've tried:
curl --request GET https://montanaflynn-spellcheck.p.rapidapi.com/check/?text=$KMVAR_test
-H 'x-rapidapi-host: XXXXXXXXXXXXXXX'
-H 'x-rapidapi-key: XXXXXXXXXXXX' \

curl --request GET "https://montanaflynn-spellcheck.p.rapidapi.com/check/?text=$KMVAR_test"
-H 'x-rapidapi-host: XXXXXXXXXXXXXXX'
-H 'x-rapidapi-key: XXXXXXXXXXXX' \

curl --request GET 'https://montanaflynn-spellcheck.p.rapidapi.com/check/?text='"$KMVAR_test"
-H 'x-rapidapi-host: XXXXXXXXXXXXXXX'
-H 'x-rapidapi-key: XXXXXXXXXXXX' \

curl --request GET "https://montanaflynn-spellcheck.p.rapidapi.com/check/?text=""$KMVAR_test"
-H 'x-rapidapi-host: XXXXXXXXXXXXXXX'
-H 'x-rapidapi-key: XXXXXXXXXXXX' \

Is the text in the variable percent-encoded? If not, there’s a filter for that:

36-pty-fs8

With that, I think, your first variant (w/o quotes) could work. Probably the second one also.

Thank you Tom!
It work with the filter and
curl --request GET https://montanaflynn-spellcheck.p.rapidapi.com/check/?text=$KMVAR_test
-H 'x-rapidapi-host: XXXXXXXXXXXXXXX'
-H 'x-rapidapi-key: XXXXXXXXXXXX' \