I went to OpenAI API and i generated an API key, then i use it to integrate with chat GPT… i were not asked to pay or to subscribe to any free trials, so is chat gpt API offered for free?
ok thanks , after that how the consumption will be calculated ? they said per token, so is the token what we type to Chat GPT ? or is what we get from chat gpt ? @curt.kennedy
1000 tokens is roughly 750 English words. Each time you call the API, you are charged for your Input tokens and your Output tokens. So if your prompt had 1000 tokens on the Input and 300 tokens on the output, you are charged for 1300 tokens. Pricing varies by model, so check the Pricing page for the latest. So in this example, for gpt-3.5-turbo this is $0.0026.
Charge is on Total tokens which is Input + Output, so yes.
Maximum tokens varies by model, see the Docs. But generally the current max is around 4000 tokens for most recent models (excluding embeddings which are now around 8000 tokens). The 4000 tokens is around 3000 English words. You can go with these rough guidelines, or if you need a precise token count, you can use tiktoken to get an accurate count specific to each model used.
@curt.kennedy Thanks again for your reply.i am not talking about the limit per request i am talking about the total consumption for our account? so can we say that we only want to spend let say 30 USD this month? and renew it next month? so we do not want to pay more than 30 USD per month, and if the amount reaches 30 USD were are fine to receive errors or having the api stop working till we renew it again and so on …
Go into your account Settings > Billing > Usage limits and you can set the hard and soft limits. The default is $120/month for me, so you should go in and update this if you only want $30.
@curt.kennedy i think i need to have a price plan to set the usage limit, as currently i have free trial so i can not set usage limit,thanks a lot for your help…
I am on free trial and I can’t do single request even if my usage is 0. I get “Response status code does not indicate success: 429 (Too Many Requests)”. So is there free trial for API or not?
It looks like the Pricing page no longer mentions the free credit on signup (but did earlier today). Looks like they may no longer be offering the free credit?
I have the same issue. When I try to add the payment method they ask me to pay at least 5$. So it looks like they do not offer a free trial( Do you know how to access a free trial?