Pricing questions OpenAI

Hi all,

I am trying to work out how to calculate my usage of the API when used by other applications that I am running.

Let’s say I have a text generate that let the user choose the right model.

For now:
Davinci: $0.02
Currie: $0.002
Babbage: $0.0005

If I send an text to be rewritten to the API, using this prompt:
Rewrite this text "Welcome to the OpenAI API Community Forum!

1)Will I get charged on the “Rewrite this text” or the entire "Rewrite this text “Welcome to the OpenAI API Community Forum!”

2)How can I work out a precost on a prompt like this "Rewrite this text “Welcome to the OpenAI API Community Forum!”

3)As it seems that the cost is calculated in tokens, will more tokens be used when using “Davinci” over “Curie” or will (in the back end of openAI) the tokens will be multiplied by their respective cost per 1k/tokens(above).

Thanks!

1 Like
  1. You will be billed for "Rewrite this text “Welcome to the OpenAI API Community Forum!”

and the completion it sends back

  1. You cant unless you can get a tokenizer you can run in your own code

  2. The same number of tokens are used by any model

  3. Add up the tokens in a month and divide by 1000. Them multiply by cost per thousand tokens

Thank you so much! Very much appreciated