I think that the Embeddings API is the solution here.
Check this tutorial: OpenAI API
For quick access you should store vectors in database. More information and list of Vector databases: OpenAI API
This thread may be helpful: Storing embeddings in SQL Server? Latency between Redis & Pinecone? Vector DB recommendations? - #2 by raymonddavey