Ask HN: How to manage AI APIs for SaaS application?
I want to build an AI app. My idea is to support BYOK (bring your own key) or to manage one API key for each user.
What are the solutions to issue a lot of API keys for commercial apps? I would love to hear from the community.
11 comments
[ 3.4 ms ] story [ 29.2 ms ] threadThe messy stuff was abuse prevention, retries/fallbacks, and sudden cost spikes once real users started using different workflows.
My suggestion: go with openrouter... it offers management keys that you can use to issue keys on the fly for your customers. You can also set quota per key.
With this setup, everything gets offloaded to them. You just pay 5% commission (when you load credits to their platform).