The narrator is able to escape death by pendulum, because he enlists the help of the rats that he shares his prison with. The narrator rubs his oily and bloody hands all over the straps that tie him in place, and then he lays very still. The rats, smelling food, climb on top of him and gnaw their way through the straps.
Plainly I perceived the loosening of the bandage. I knew that in more than one place it must be already severed. With a more than human resolution I lay still.
The final method of torture that the narrator must endure is the room changing shape and temperature in order to force him to jump into the pit. The walls around him are being super heated, which forces him away from the walls. The the room begins to close in on him, which forces him even closer to the pit.
And now, flatter and flatter grew the lozenge, with a rapidity that left me no time for contemplation. Its centre, and of course, its greatest width, came just over the yawning gulf. I shrank back -- but the closing walls pressed me resistlessly onward.
The story ends with the narrator's rescue and survival. General Lasalle miraculously shows up at the very end to save our narrator and all victims of the Inquisition.