There are plenty of alternatives incase your Open AI API is out of the free credits :
-
Together AI : Run OpenSource models, fine tune them or use custom AI model architectures
-
Hugging Face : Find All kinds of Open Source AI Models right here!
-
OpenRouter : A unified interface for LLMs
Here I've given an example on how to use Together AI API Key / OpenRouter API Key in Next.js App
To get started with the simple 5 steps:
- Fork/Download this repository
- Put the
api/chat/route.js
folder in yourapp
directory in your Next.js project folder (as shown here) - Remember: Your
.env.local
file should be in the main project directory (as shown here) - I have commented accordingly, remove the extra code and keep for whichever api key you're using
- That's it! Your AI Model is ready to use... 🎉
- LinkedIn : Connect w/ me Here!
- Email : Don't feel shy... Email & I'll always respond