Hacker News new | ask | show | jobs
by mp5 407 days ago
This is a great suggestion. We're actually storing the input/output costs of most models, but aren't computing cost estimates yet. Definitely something to add. My only hesitation is that token-based cost estimates may not be accurate (most models do not provide their tokenizers, so you have to eg. estimate the average number of characters per token in order to compute the cost, and this may vary per model).
1 comments

It'd probably be useful to just show cost after the fact based on the usage returned from the API. Even if I don't know how much my first request will cost, if I know my last request cost x cents then I can probably have a good idea from there.