Getting Bad request: Invalid (Lazy) Media object trying to access media served through API

I’m referring to the last post on that thread made by Meredydd in regards to permalinks (what I want to avoid):

And no, I haven’t tried that because of what I said before, I’m trying to avoid permalinks and Meredydds method (which was fine for the user in that thread) is actually a way to create permalinks.