"OpenAI API" has sort of become a standard API for any models through other tools which expose identical end points regardless of the underlying model. You can use ollama for that
If you setup Ollama and download a local model, all you have to do is follow the readme instructions, let me know if you need any help!