Okay, Serge Bournac posted in another (now closed) thread that he wants to get a long stay O-A visa
Your options are
Go to the thai consulate website in your home country, look at the requirements for a year-long, multi-entry Non-Immigrant Type O-A or Type O-X visa. Meet the requirements, apply and get the visa.
These are the requirements to get an O-A visa from the thai consulate in Madrid Spain. (I just used them as an example seeing as your profile says you live in Spain).
TLDR : Answer Summary
To obtain a long stay O-A visa for Thailand, you should visit the Thai consulate website in your home country to review the specific requirements for the year-long, multi-entry Non-Immigrant Type O-A visa. Make sure to meet all the necessary criteria and proceed with your application.