LLM1 (the one that arrived at "$108.86" for Cluade 3 Sonnet. LLM2 the one that arrived…
- User
LLM1 (the one that arrived at "183.60" for GPT-4o"
LLM1: Assume 1000 tokens instead of 400. LLM2: Why did you says 14.4 cycles a day? You correctly calculated 28.8 but never used it again.
Assistant
You're absolutely right — there was a discrepancy in the original calculation, and you've caught it with precision. Let's now correct and re-calculate everything clearly, focusing on:
- Fixing the token assumption from 400 to 1000 tokens per page.
- Correctly applying the cycle rate of 28.8 cycles/day, not 14.4.
✅ Updated Assumptions
- Tokens per page:
1000 tokens(as corrected). - Story length: 10 pages →
10 × 1000 = 10,000 output tokens. - Input context grows each step:
- Call 1: 1k input
- Call 2: 2k input
- ...
- Call 10: 10k input
- Total input =
1k + 2k + ... + 10k = 55k input tokens
- Total tokens per cycle:
- Input:
55,000 tokens - Output:
10,000 tokens
- Input:
- Time per cycle: 10 pages × 5 minutes = 50 minutes
- Cycles per day:
(24 × 60) / 50 = 28.8 cycles/day - Cycles per month (30 days):
28.8 × 30 = 864 cycles/month
🔢 Monthly Token Usage Summary
Type Tokens per Cycle Monthly Total (864 Cycles) Input 55,000 47,520,000 (≈47.52M) Output 10,000 8,640,000 (≈8.64M)
💵 Updated Model Pricing (May 2024)
Provider Model Input ($/1M) Output ($/1M) Anthropic Claude 3 Sonnet $3.00 $15.00 OpenAI GPT-4o $5.00 $15.00
🧮 Cost Calculation by Model
1. Claude 3 Sonnet (Anthropic)
- Input Cost:
47.52M × $3.00 = $142.56 - Output Cost:
8.64M × $15.00 = $129.60 - Total Monthly Cost:
$142.56 + $129.60 = $272.16
2. GPT-4o (OpenAI)
- Input Cost:
47.52M × $5.00 = $237.60 - Output Cost:
8.64M × $15.00 = $129.60 - Total Monthly Cost:
$237.60 + $129.60 = $367.20
✅ Final Summary Table
Model Input Cost Output Cost Total Monthly Cost Claude 3 Sonnet $142.56 $129.60 $272.16 GPT-4o $237.60 $129.60 $367.20
📌 Key Takeaways
- With 1000 tokens per page, costs increase significantly compared to the 400-token/page scenario.
- You're correct that 28.8 cycles/day is accurate, which leads to 864 cycles/month, not fewer.
- Claude 3 Sonnet remains more cost-effective than GPT-4o, despite both being premium models.
- The input cost is a major factor here due to growing context size.
Let me know if you'd like to compare this to cheaper models (like Llama 3 or Gemini) under these updated assumptions!
- User
Can you give me the function that gives cost parameterised by "input cost", "output cost", "delay" (5 mins currently), and "tokens per page"? Additionally, What if there were 3x the amount of output (but still only 1 page was selected, so input tokens remain the same)?
Assistant
Absolutely! Let's formalize this into a general cost function that you can use for any model, given:
input_cost: price per million input tokens ($/1M)output_cost: price per million output tokens ($/1M)delay: time between requests in minutestokens_per_page: number of tokens per page (default: 1000)pages_per_story: how many pages to generate per story (default: 10)extra_output_factor: multiplier on total output tokens (e.g., 3x output)
📌 Step-by-Step Breakdown
1. Tokens Per Story
Let’s define the number of tokens used per full story generation.
-
Input tokens grow linearly:
- Call 1: 1 × TPP
- Call 2: 2 × TPP
- ...
- Call N: N × TPP
- Total Input Tokens = TPP × (1 + 2 + ... + N) = TPP × N(N + 1)/2
-
Output tokens are constant per call:
- Each call generates 1 page → 1 × TPP
- Total Output Tokens = TPP × N
Where:
TPP= tokens per pageN= number of pages per story
If we apply an output factor, say 3× more output per page, then:
- Total Output Tokens = TPP × N × output_factor
2. Monthly Volume
Given:
- Time per story = N × delay minutes
- Cycles per day = (24 × 60) / (N × delay)
- Monthly cycles = cycles/day × 30
So:
- Total monthly input tokens = input_tokens_per_story × monthly_cycles
- Total monthly output tokens = output_tokens_per_story × monthly_cycles
3. Cost Function
Putting it all together:
def calculate_monthly_cost( input_cost_per_million, output_cost_per_million, delay_minutes, tokens_per_page=1000, pages_per_story=10, output_factor=1 ): # Tokens per story input_tokens = tokens_per_page * pages_per_story * (pages_per_story + 1) // 2 output_tokens = tokens_per_page * pages_per_story * output_factor # Cycles per month cycles_per_day = (24 * 60) / (pages_per_story * delay_minutes) monthly_cycles = cycles_per_day * 30 # Total monthly token usage total_input_tokens = input_tokens * monthly_cycles total_output_tokens = output_tokens * monthly_cycles # Convert tokens to millions and compute cost input_cost = (total_input_tokens / 1_000_000) * input_cost_per_million output_cost = (total_output_tokens / 1_000_000) * output_cost_per_million return { "input_tokens": total_input_tokens, "output_tokens": total_output_tokens, "input_cost": input_cost, "output_cost": output_cost, "total_cost": input_cost + output_cost, "monthly_cycles": monthly_cycles }
🔁 Example Usage
Scenario: GPT-4o with 3× output volume
calculate_monthly_cost( input_cost_per_million=5.00, output_cost_per_million=15.00, delay_minutes=5, tokens_per_page=1000, pages_per_story=10, output_factor=3 )Output:
input_tokens: ~47.52 million (same as before)output_tokens: ~25.92 million (3× previous value)input_cost: $237.60output_cost: $388.80- Total Cost: $626.40/month
✅ Summary Table: GPT-4o at 1× vs 3× Output
Metric 1× Output 3× Output Output Tokens/Month ~8.64M ~25.92M Input Cost $237.60 $237.60 Output Cost $129.60 $388.80 Total Monthly Cost $367.20 $626.40
🧠 Final Notes
- The input cost remains fixed if you're still generating one page per request — even with more output.
- Increasing output increases output token usage linearly, which can significantly raise costs for models like GPT-4o or Claude Sonnet.
- This function is modular — you can plug in any model's pricing and adjust parameters accordingly.
Would you like a version of this as a spreadsheet or interactive calculator (e.g., Google Sheets or Python notebook)?
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.