Trial and error toward cutting AI API cost (워넬의 AI API 비용, 98% 절감까지의 시행착오)
B · Useful, limited Woowa Tech Course trainee talk with a fixed, repeatable cost test and measured numbers for each method; a clear small experiment, but one feature, 40 questions and an undefined quality metric.
Summary based on the full transcript·Original: about 16 minutes to watch
In short
A 16-minute Woowahan Tech talk (20 November 2026) by a backend trainee, "Wonel", on cutting the API cost of a feature that writes interview questions from a GitHub repository and portfolio sentences. Each fix moved the bottleneck: reusing a stored analysis cut input cost, embeddings cut the first analysis, and then question generation became the main cost. Prompt caching barely helped. The title's 98% is a projection; the measured saving is about 96%.
Key numbers
- $8.19baseline API cost to generate 40 interview questions by sending the whole repository each time
- 98.25%share of baseline cost that was input tokens (3.21M input vs about 9,500 output)
- $0.33, about 96% lowermeasured cost after embedding code and sending only the top 8 relevant chunks
- 1.7%total saving from prompt caching, despite a 21.3% cut in generation cost
- 90-92.5%question quality across all methods (metric not defined in the talk)
As reported by the source.
Korean·Video·opens youtube.com
What it reports
- Test: one small and one large repository, four portfolio sentences each, five questions per sentence (40 questions), one generation model at low reasoning effort.
- Baseline: whole repository sent 8 times, $8.19; input was 98.25% of cost.
- Analyse each repository once, store as JSON, reuse: analyses 8 to 2, cost $2.26 (-72.4%); about 90% of what remained was the first analysis.
- Embed code chunks and send the top 8 by similarity: 900k embedding tokens cost about $0.018; total $0.33 (-85.5% on the JSON method, about -96% on baseline). 94.5% of the remaining cost was generation.
- Prompt caching did not trigger on the embedding path (different chunks per sentence, shared prefix below the minimum). On the JSON path it cut generation cost 21.3% but total cost only 1.7%, because the first analysis still cost about $2.
- Repository analysis on a local LLM: projected $0.146 (-98.2%), tested on one sentence only; output was cut at 512 tokens and one sentence took 129 seconds.
- The team shipped the embedding method, judged on cost, quality, speed and operability.
How they got it
Controlled comparison of five methods on the same 40-question task, with token counts and costs read from API usage. Quality scores are reported without a definition.
Limits
- Trainee project, one feature, 40 questions; costs depend on the provider's prices at the time.
- The 98% headline is extrapolated from a single-sentence local run.
- No definition or rater for the 90-92.5% quality scores.
Why it matters for companies
The method is the takeaway: break cost into stages, fix the biggest, then measure again, because the cost moves. Most of the waste was resending the same large context; retrieval of relevant chunks fixed it, and caching only helps when long identical prefixes repeat. The cheapest option (local model) lost on speed and reliability, so the shipped choice was the one verified end to end.
Key passages in translation
Korean original
토큰이 곧 비용이다 맞는 말일까요? 꼭 그렇지만 않습니다
Tokens equal cost: is that right? Not always.
Korean original
반복 입력을 줄이자 최초 분석 비용을 찾았고, 분석 비용을 줄이자 질문 생성 비용이 새로운 병목으로 나타났습니다
Cutting repeated input exposed the first-analysis cost; cutting that made question generation the new bottleneck.
Korean original
가장 저렴한 방법이 이 서비스에 가장 적합한 방법은 아니다
The cheapest method is not the best fit for this service.
Summary based on the full transcript. Read the original for the full argument and data.Watch the original on youtube.com