The problem
AI providers bill in dollars to international cards, and some don't serve Myanmar at all. A student who wants to build with these models has no simple way to pay for them.
What I built
- One key, many modelsA single endpoint that speaks the OpenAI, Anthropic and Gemini request formats, so existing SDKs and coding tools work by changing only the address and the key.
- A wallet in kyatTop up from K5,000 with local payment apps, upload the receipt, and the balance is credited once the order is approved.
- Free models to startA set of free models with daily limits, so people can try the API before they pay anything.
- Keys, usage and limitsCreate several API keys, cap what each one can spend, and see usage and cost per request.
- A command-line toolA
nyanapiCLI published on npm, for getting set up from the terminal. - Admin consoleOrders, customers, models, prices and provider health in one place.
The hard parts
- Money that never driftsEvery amount is a whole number: one kyat is 10,000 units, so a request costing a fraction of a kyat is stored exactly. Every balance change is a row in a ledger, written in the same transaction as the balance itself.
- Charging for something that streamsThe real cost is only known when the answer finishes. A hold is placed on the wallet before a request starts and settled against the actual token count at the end, so two requests at once can't spend the same balance.
- Staying up when a provider goes downEach model can have more than one route. If a provider errors or times out, the request moves to the next one. A free request never falls over to a paid route.
- Never selling at a lossProvider prices change. A price sync and a break-even check compare what customers pay with what each request costs, and a reconciliation job checks recorded usage against what providers actually billed.
- Bonuses that can't be farmedWelcome, first top-up and referral credit sit in a separate bonus balance that expires and only works on cheaper models. Sign-up has a CAPTCHA and email verification.