Help With Raw Transaction Fee - Absurdly High Fee I've been working on my Litecoin wallet for a while now. But I can't seem to control the transaction fee when I make raw transactions.

I know how to send transactions with Litecoin-Qt GUI:
https://live.blockcypher.com/ltc/tx/2b2f0aab9d2661840a60b172dcda24f359e85b7dbd0810e7afb2d3a6c0b8e59c/

No problem with that, the fee was 0.00017 LTC and was included in the next block. The vsize of this TX = 170, which explains the 0.00017 LTC fee.

But I'm also working on my own wallet on my VPS with the Litecoin-CLI. I made a raw TX, signed it and sent it. This happened:
https://live.blockcypher.com/ltc/tx/32ceefc7f377ad53c91922dffe62e6fd19e48a46d6afb4d610c2c090646404dc/

A transaction fee of 0.1 LTC!!! And the vsize is just 192.

I went back to the litecoin.conf file and it has the paytxfee=0.001 parameter. Which means it would cost me 0.001 LTC/kB. maxtxfee wasn't turned on yet, but now it is with a value of 0.001. When I try to send now, it just prompts me with: "error":{"code":-26,"message":"256: absurdly-high-fee"}.

What am I doing wrong?

(Yes I'm testing my wallet on the mainnet, I'm stupid)
The fee of a transaction is just the difference between the input and the output value. In the second transaction you posted, the input value was 0.25 LTC and the output value was 0.15 LTC, so you paid a 0.1 LTC fee (0.25-0.15) as you say. If you choose an input which is larger than the output you want to send as well as the fee, you have to create a change output to send the rest back to your wallet as well, otherwise it will all go to the miners as fees. For example, if your input was 0.25 LTC, and you wanted to send 0.15 LTC and only pay 0.01 LTC fee, your transaction would need to have two outputs, one for 0.15 LTC, and one for 0.09 LTC back to an address you own, so that the total fee is just (0.25-(0.15+0.9) = 0.01)