Calculating embeddings costs

Hi, can someone help me understand the costs for Semantic text search using embeddings?
Let’s assume a csv file with 100 lines having 100 tokens each and a term of 50 tokens for search. What’s the calculation per requst?

You can calculate your tokens here tokenizer
Here you will find the cost apenai pricing

Thanks, but it doesn’t answer the question. I’m interested in knowing if there are multipliers, such as when using the old semantic search method.

Unlike search, you only need to run each piece of text through an embedding engine once and then can do the rest on your own machine. So it should be close to:

100 lines * 100 tokens/line (for the document corpus) + 50 tokens (the search query) = Roughly 10050 tokens. And then multiply that by the price of the model you’re using.

And if you did more searches on the same corpus, just 50 tokens per search.

3 Likes

Thanks for the clarification!