Your (Bad) API Design is Costing you Tokens
summary
An experiment compares a tidy REST/HAL API against a messy RPC-style version with identical business data and measures generated-code correctness and token cost across OpenAI, Anthropic, and Google frontier models. Results show 74% vs 48% success rate for tidy and messy APIs, tidy outputs ~3,000 tokens while messy often doubles that, and token overhead ranges roughly 30%–77% with ~52% average overhead; GPT‑5‑mini shows higher reasoning-token use. Causes: inconsistent naming, POST-for-read, no hypermedia links, and RPC workflows that force models to infer relationships.
AI-written summary · about
