#Cost seems high? Am I doing something wrong?

4 messages · Page 1 of 1 (latest)

drifting osprey
#

I used a tutorial to create a simple app using SvelteKit. It accepts an input, and then alters it based on a pre-set prompt that I send with it.

It looks like it's costing me around 1 cent per request. I'm doing a prompt that's about 650 characters, plus whatever context the end user provides which is capped at 280. Am I doing something wrong or is that the normal cost?

One thing that surprised me was that I'm basically re-submitting the same prompt over and over, with new context. I would've thought there would be a way to like "prime" it so that I don't have to give it the same instructions over and over, sort of like a way to control its permanent memory or something.

Anyway, just wanted to check what the norm is here. I obviously have no issues with a penny per request for me, but if I release it and it gets used tons of times a day it'll start to add up. Also that's for GPT 3, I haven't even figured out how to use 3.5 or 4 yet which I assume are more expensive. (And 4 does a WAY better job for this particular case)

humble pollen
#

https://openai.com/pricing and https://platform.openai.com/tokenizer and the total_tokens set in each response will help you narrow down costs

Example, with gpt3.5 turbo you’d pay about 0.007 usd (0.7 cent) total (input output) per 1k tokens
1k tokens are approximately 750 characters

There’s no “gpt3” model by my knowledge, so probably you’re using the 3.5 turbo
All other models are A) deprecated and B) have different code names:

https://platform.openai.com/docs/deprecations/

Simple and flexible. Only pay for what you use.

mellow charm
#

.007 is less then 1 cent, 1 cent would be .01.

humble pollen
#

Yeah, what I said.