Hacker News new | ask | show | jobs
by mil22 921 days ago
60 QPM free is great, but the pay-as-you-go pricing is the same.

Courtesy of GPT4:

"To determine which option is cheaper, Gemini Pro or GPT-3.5 Turbo, we need to consider the average length difference between tokens and characters and the pricing structure for each.

Gemini Pro Pricing: Input: $0.00025 per 1,000 characters Output: $0.0005 per 1,000 characters

GPT-3.5 Turbo Pricing: Input: $0.0010 per 1,000 tokens Output: $0.0020 per 1,000 tokens

Average Length Difference Between Tokens and Characters: A token in GPT-3.5 can be a single word, part of a word, or a special character. On average, a token in GPT-3 models is roughly equivalent to 4 characters (this is a rough estimate as the length of tokens can vary significantly).

Given this information, let's calculate the effective cost per 1,000 characters for both Gemini Pro and GPT-3.5 Turbo. For GPT-3.5 Turbo, since 1 token ≈ 4 characters, the cost per 1,000 characters would be a quarter of the cost per 1,000 tokens. We'll calculate the cost for both input and output for each and compare.

The total cost per 1,000 characters for both Gemini Pro and GPT-3.5 Turbo, considering both input and output, is the same at $0.00075. Therefore, based on the provided pricing and the average token-to-character ratio, they are equally cost-effective."

1 comments

I am wondering why it would price them in characters but not tokens? Are they processing characters directly as tokens without tokenizer?
Maybe because it's easier this way to estimate the data size before you send it to the API.
I am not sure about that. You are already using API, should be trivial to use a tokenizer to get the number. Also prompt is just minor part of the cost. You have much less control in the completion part, which is the majority of the cost.