I did not go looking for an API gateway. I went looking for a quieter inbox. Our team was four people, one small support product, and about nine hundred customer conversations a week that needed summarising before anyone could answer them properly. The summaries were not the hard part. A decent model could do them in seconds. The hard part was everything around them: the keys, the retries, the mornings when one provider was slow and the whole queue backed up behind it. By March I was spending more time babysitting model calls than I was spending on the product itself, and that was the moment I knew the wiring had become the job.
Before that, we had done what most small teams do. We wired each model in separately. One provider for the long, careful summaries, another for quick classification, a third for the odd translation when a customer wrote in German or Portuguese. Each one had its own key, its own client, its own way of reporting an error, and its own idea of what a timeout should be. It worked, in the sense that nothing was on fire most days. It also meant that changing a model meant touching four files, two environment variables and a deploy, and that nobody except me wanted to touch any of it.
The move to a single endpoint happened on a Tuesday, because Tuesdays are the only days our support queue is forgiving. I pointed the summariser, the classifier and the translator at one address, kept the model names in a config file instead of in the code, and spent the afternoon watching the first hundred calls go through. Nothing dramatic happened, which felt like a small miracle. The first thing I noticed was not speed or price. It was that I could finally see all of it in one place: which model was answering, how long each call took, and what each one was actually costing us. That visibility changed how I thought about the whole setup, and it came from routing everything through AzYun instead of keeping three separate integrations alive.
The bill that did not match the price list
The first surprise was the bill, and it was not a big one, which is exactly why it took me two weeks to notice it. On paper, the cheapest model we used cost about a third of the one we had started with. In practice, the monthly total barely moved. The reason was embarrassingly simple once I looked at the logs. The cheap model needed longer prompts to do the same job. Our summaries fed it the whole thread, the customer history and a short style guide, and it kept asking for the context in a different shape, so we padded the input until the answers stopped drifting. We were paying for tokens, not for answers, and a model that needs a thousand extra tokens to get the same summary right is not cheap at all. I worked it out one evening with a spreadsheet and the previous month’s logs: per finished summary, the cheap model was costing us about forty percent more than the mid-priced one, because every call carried a heavier prompt and a second attempt whenever the first answer came back too short. That changed how I compare models. Now I measure the cost of a finished job, not the price per million tokens: a summary is only done when a support agent can use it without opening the original thread, retries and rewrites included.
A slow model is not a cheap model
The second surprise was speed, and it hurt more than the bill did, because customers could feel it. Our agents work in a queue. When a summary takes four seconds, the queue flows. When it takes twenty, the agent waits, the next customer waits, and the whole afternoon starts to feel sticky. The cheapest model was usually fine, until it was not, and the bad hours always arrived at the worst time: Monday mornings, the hour after a product update, the day a big customer sent in fifty tickets at once. I watched one Monday as the average response time crept from six seconds to twenty-two, then to forty, while nothing in our code had changed. The model was not down. It was just busy, and busy, from the outside, looks a lot like broken. We added a timeout of twenty-five seconds and a single retry on a different model, and that one change did more for the team than any price comparison ever had. I also learned to spread the load: the classifier went to a lighter model, the long summaries to the one that handled them best, and the translator was allowed to wait in a queue of its own. Once the work was spread out, the peaks flattened, and the Friday errors stopped.
The night the fallback worked, and the morning it did not
Then came the night that made me grateful for a fallback, and the morning that taught me its limits. At about half past one, our main summarising model started returning errors. Not every call, just enough of them to be alarming: one in three, then one in two. The fallback caught them and sent them to a second model, and the queue kept moving. I woke up to a handful of alerts instead of a disaster, and for an hour I felt very clever indeed. Then I read the summaries from that night. They were shorter, blunter, and in three cases they missed the actual complaint entirely, because the second model had a different idea of what mattered in a thread. The fallback had saved the queue and quietly lowered the quality, and nobody had noticed until a customer wrote back asking why we had ignored the refund request in their third message. A fallback that changes the answer is not the same as a fallback that keeps the lights on, and I had not tested it as if it were.
What I check before I trust a route
My morning routine now takes about ten minutes and it is mostly reading. I open the usage page, look at the previous day’s cost per finished job rather than the total, and check how many calls retried and how many fell back to a second model. If the retry rate on any route has climbed above about five percent, I move that work before it becomes a Monday problem. I keep the model names in one config file, and when I want to try a new one I route ten percent of the traffic to it for a week, compare the finished summaries side by side, and only then decide. The switching itself is the easy part now, because everything goes through one AI API gateway and the AI Models API behind it, so a change is a line in a file rather than a deploy. The hard part, the part I still get wrong sometimes, is deciding what better means for a specific job, and that is a question no price list will answer for you.
If I were starting again, I would still put everything behind one gateway, and I would do it sooner. I would just stop pretending that the cheapest price, the fastest test, or the smoothest first week tells you much about the second month. The real cost of a model is the cost of a finished, usable answer, including the retries, the longer prompts, the slow Mondays and the fallback you only discover at half past one in the morning. Measure that, keep the routes easy to change, and log which model actually did the work.






