<< Home | Work
API bill dropped from $400+ to under $100
| Area | Work |
| AI used | Aider |
| Source | r/ChatGPTCoding |
| Posted | 2026-09-16 |
The move
Switch from agentic coding loops to single-shot prompt edits for known files.Steps
- Identify the specific files required for your coding task.
- Create a single prompt containing the full text of those files.
- Include clear instructions on the specific code changes needed.
- Send the entire context in one LLM call instead of allowing an agent to loop.
Prompt for your AI
I need to modify [file_name_1] and [file_name_2]. Here is the content of these files: [paste file contents]. Based on this code, please perform the following change: [describe specific code change]. Provide the output as a single SEARCH/REPLACE block.
What happened
The user noticed their AI coding assistant was consuming excessive tokens by performing multiple back-and-forth calls for simple tasks. By switching to a single-shot approach where all necessary context is provided in one prompt, they significantly reduced token usage. This change lowered their monthly API costs from over $400 to under $100.Watch out
Providing too much context can hit the model's maximum token limit. Ensure the code provided is relevant to the specific task to avoid unnecessary costs.Give it to your agent
Read https://howtheyuse.ai/p/api-bill-dropped-from-400-to-under-100.md and help me do this.