i researched that question for apfel https://github.com/Arthur-Ficial/apfel and standardized API is openai api so thats what i went with
OpenAI's API is not local AI.
Most local AI servers expose that API.