#question

1 messages · Page 1 of 1 (latest)

plucky hemlock
#

I was wondering if the openai api was really paid because sometimes I have the impression that my tokens do not decrease so I was wondering if certain models were free or if I am wrong

thorny mirageBOT
#

Hi @plucky hemlock. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

The OpenAI API is indeed a paid service. The API usage is charged per token and the cost varies depending on the model you are using. You can find details on token pricing here (https://openai.com/pricing). The API is funded by credits that you prepay, and these credits expire after 12 months. The credits are used to pay for API services, which are billed based on the actual language data usage (source (https://community.openai.com/t/726886)).

However, it's important to note that the OpenAI AI model is stateless and memory-less. Every API call you make is independent. The billing of most AI models is asymmetric - you don’t pay as much to place past responses into input as it cost to originally generate (source (https://community.openai.com/t/801650)).

Also, if you get a bad request error, then the input sent to API could not even be parsed into the individual components of parameters, and likely didn’t even make it to a token encoder, let alone to an AI model. Therefore, no tokens are used and no cost is incurred (source (https://community.openai.com/t/809610)).

There are some exceptions though. For example, the use of the Whisper models via the Python package is free under the license indicated by the GitHub project page (MIT). Only the use of the hosted solution/service provided by OpenAI via the web API costs money (source (https://github.com/openai/whisper/discussions/1285)).