How to setup api service for selling with nextjs t3?
Anyone know of a good t3 or t3 turbo template/project that shows you how to setup an API service that you sell. Like fal.ai / together.ai. Kind of setup. I just wanna spin up a bunch of serverless llm endpoints and then charge people to use them.
6 Replies
no, but stripe docs is a good start
I mean I need a model for creating api keys and allowing people to use those for making requests to my app programmatically.
I can probably rig it up quite easily. BUt I would like a good example with some best practices etc. So I can break it down and compare to my current understanding of how I would do this.
If you can rig it up quite easily then try it and come back when you have more specific questions
I've explained why I am looking for examples before I get started. If you have any. Feel free to share.
So you're capping, got it. You don't need a "model" for generating API keys. Use NextAuth or Lucia Auth or clerk, set up a db to save your users, set up a server or use server less to generate API keys and save them in your user table.
There you go you are started.
If your app is going to be based around AI offerings then why not use AI to generate the example you need?
There you go you are started.
If your app is going to be based around AI offerings then why not use AI to generate the example you need?
transactions
is the only thing you need to keep in mind
db transactions
you will prob need a cron job and a task quee
unless smol