If you are married to a local then you can obtain a marriage visa and extend this visa in Thailand for 12 months if you meet the financial requirements. You will need to prove that you have 400,000 THB in a local bank account and that you are legally married.