Can you reach the api from http://ip-to-lxc:3456/api/v1/info in your browser?
Do you have mod_rewrite
enabled?
Does it work in private mode?
What version (frontend + api) are you using?
Could it be you have some leftover api token in your local storage of your browser? (https://support.mozilla.org/en-US/kb/storage or open devtools > storage > local storage)
By default, the api should just work™ without any other configuration. It will use the default config.