First thing first if you want to get a Thai residency in Thailand you must have had a Thai non-immigrant visa for at least three years before the submission of your application. Holders of multiple NON-Immigrant visas can not apply. You must have 3 consecutive yearly extensions to qualify.
The cost? There is a non-refundable application fee of 7,600 baht when you formally submit your application.