This particular prayer called Gajendra moksha stotra is present in 8th skandha of Srimad bhagwatam.
सोऽहं विश्वसृजं विश्वमविश्वं विश्ववेदसम् ।
विश्वात्मानमजं ब्रह्म प्रणतोऽस्मि परं पदम् ॥ २६ ॥
so ’haṁ viśva-sṛjaṁ viśvam
viśvātmānam ajaṁ brahma
praṇato ’smi paraṁ padam
Now, fully desiring release from material life, I offer my respectful obeisances unto that Supreme Person who is the creator of the universe, who is Himself the form of the universe and who is nonetheless transcendental to this cosmic manifestation. He is the supreme knower of everything in this world, the Supersoul of the universe. He is the unborn, supremely situated Lord. I offer my respectful obeisances unto Him.