For the API you can use any programming language and Framework or Library you are familiar with or serves a better purpose for you, just make sure Supabase has a Library for it (remember that most of them are community supported). Also, you have some alternatives to OpenAI, such as LangChain (
https://www.langchain.com/)