Claude 3.5 sonnet API + oTToDEV cost analysis

Hello guys, I just got curious to know about the API cost for Claude 3.5 sonnet to develop a million LOC (example) software and asked this to chatgpt and it gave me the below response of the cost analysis. Would really appreciate anyone who can share some insights on the reality of this cost analysis. And also I would like to know whether oTToDEV is capable of developing a million LOC software using sonnet 3.5 or any capable local LLM. Thank you :blush:

Chatgpt response:

Input Token Cost: $3 per million tokens

Output Token Cost: $15 per million tokens

The estimate includes extensive testing and more than 10 iterations for finalizing the software.

Assumptions:

  1. Token Calculation:

1 line of code (LOC): ~10 tokens (5 input + 5 output on average).

• 1 million LOC: 10 million tokens total (5M input + 5M output).

  1. Iterations:

10 iterations for refinement and testing.

• Each iteration processes the same 1 million LOC (10M tokens per iteration).

  1. Extensive Testing:

• Testing will add 50% more token usage compared to the coding process.

  1. Additional Tokens:

• For design, requirement analysis, and deployment: 30% of coding token consumption.

Cost Breakdown:

  1. Coding Phase:

Tokens per iteration: 10 million (5M input + 5M output).

10 iterations:.

Input cost: 50M, \text{tokens} \div 1M \times 3 = $150

Output cost: 50M, \text{tokens} \div 1M \times 15 = $750

• Total coding cost = $900.

  1. Testing Phase:

Tokens: 50% of coding tokens.

Total tokens =

• Input cost: 25M \div 1M \times 3 = $75.

Output cost:

25M \div 1M \times 15 = $375.

• Total testing cost = $450.

  1. Other Phases (Requirement

Analysis, Design, Deployment):

30% of coding tokens.

Input cost: 15M \div 1M \times 3 = $45.

Total tokens =

Output cost: 15M \div 1M \times 15 = $225.

• Total cost for other phases = $270.

Total Estimated Cost:

  1. Coding: $900

  2. Testing: $450

  3. Other Phases: $270

Grand Total: $1,620

Considerations:

Overhead for Edge Cases: Add 10-20% buffer for unanticipated issues or scope creep.

Final Cost Estimate: $1,620-$1,940.

3 Likes

Asking ChatGPT about this is bit weird.
LLMs return their input/output tokens in messages
I want to add that to UI later. May be someone can beat me to it.

Then we could really get some sense of how much building something costs. Would be interesting to see how close ChatGPT guesstimate will be :smiley:

I honestly doubt one would generate so much. I seen companies with many users spending so much in a month :smiley: Not single user on single project :smiley:

3 Likes

Can you help me understand how much it’ll cost to build something big (million LOC) using oTToDEV and sonnet 3.5 API. approx. cost or a cost analysis would help understand and people can budget their development cost informed without surprised by the API bill

this feels a bit like a “how long is a piece of string” type of question. It all depends on requirements, how you phrase your prompts etc and how often you need to make changes. I think that these things are all but impossible to predict.

2 Likes

For scale, a 1M LOC project is the equivalent to a full 3D game engine. A cost analysis against token costs would largely be irrelevant because you’ll probably need 100+ people to work on it full-time. Scale the problem down a ton before doing token analysis, otherwise you might just be lying to yourself.

3 Likes

Why Do that i mean you can just build the boilerplate with claude and then get it to local and work with windsruf IDE