
Explore a variety of models including Google's Palm-2-Codechat-Bison, Palm-2-Chat-Bison, OpenAI's GPT-3.5-Turbo, GPT-3.5-Turbo-16k, GPT-4, GPT-4-32k, Anthropic's Claude-2, Claude-Instant-V1, and Meta-LLAMA's LLAMA-2-13b-Chat, LLAMA-2-70b-Chat. Find out more on the OpenRouter.ai platform at https://openrouter.ai/ Repo:https://github.com/developersdigest/Unlock-GPT-4-32K-And-Claude-2-100K-API-Instantly-With-Open-Router Follow updates on our GitHub: https://github.com/developersdigest/
--- type: transcript date: 2023-07-28 youtube_id: 93QLqpfcqjA --- # Transcript: Unlock GPT-4-32K & Claude-2-100K APIs Instantly! in this video I'm going to be showing you how you can get started with using some of the more rare models without having to wait for access from a wait list so for instance GPT 4 32k and Claude 2 right now there's still a wait list for these models to be able to access them so only a select number of developers have been able to access these and start to develop with them now the other thing with some of the models in this list here such as pom2 or a llama for instance the thing with these models is you're often having to reach out to different services or platforms and go through a hole a sign up or authentication flow to get these working I'm going to show you how you can quickly go in and get started with using and experimenting with all of these models so just as an example I'll show you an output of what I'm going to be going through in just a moment so this is an output that shows you all of the different models with the same query so you can see here that a of all the different models that I had here I just had a simple Hello World app and I'm saving out all of the responses here so the way that I'm doing this is through something called open router now open router when I first came across it I thought it was interesting because their main line here is develop for free paid to use now once you get using this don't be confused with thinking that this is a free service or you just found a free API so when you sign up they do give you tokens off the bat to play with there isn't a hard limit mentioned in terms of how many tokens you get when you're starting to experiment with this but I I believe it's probably around a dollar or two from just my experimentation so the idea around this is develop for free pay to use now even though that's their concept and what they're trying to implement here the thing with this is if you read through their terms of use and whatnot which I encourage you just to look through it it is an interesting read and very short you can also pay for this obviously yourself like you know a typical app that you would build so now in terms of the actual models if you just head over to the docs page very short very digestible very easy to implement now the thing that most people are probably going to be looking for are these models here so here's how you can specify them within their endpoint and you can see that the nice thing with this is they actually give you free access to the Palm bison models right now and in addition to that you can see how cheap some of the models are within here now obviously something like gpt4 is still expensive but for that sort of Flagship foundational model that's sort of to be expected but the nice thing with this is you do have access to something like gpd4 32k or quad 2 to get experimenting with now the thing with Claude 2 that a lot of people are eager to get API access for is it does have that gigantic limit in terms of how many tokens you can send so it has that hundred thousand limit and then similar for gpd4 not as high but arguably a more powerful model it does have a considerably higher limit than what we are used to and then also it's nice that they do have the new open source models from meta so there is a little bit more in terms of getting set up and whatnot but I'm just going to dive into the code which you can go ahead and grab from the repo in the description of this video So within the first file here all that I'm doing is I just made an array of all of the different models that were listed on the page and then just like that output file that you saw there I have a response Json with a timestamp and all this is doing is it's reaching out to their endpoint and then from there it's sending in the required specifications for the headers which is the API key the HTTP referrer and the X title which are all implemented in the dot EnV and then from there it simply interacting with the llm as you'd typically use right so this is the same sort of structure that you would be familiar with and then the nice thing with this is it has a standardized schema so if you look at the responses here you can see that the choices that are being responded from the different models it has that same familiar format across them so really nice and easy to get set up so essentially everything within here all this is really doing from here it's just saving out the folder and logging it out so if I just run this here I'll just demonstrate for you so it's going to be the exact same response here but just you'll see how easy it is and how fast it is to be able to interact and experiment with all these different models so if you're already integrated and using something like GPT 3.5 or gpd4 and their API and maybe you're setting a little budget for yourself in terms of an allotment for the API usage that you're experimenting with and tinkering with I'd encourage you to consider this as another potential option is you know maybe instead of you know 10 bucks 20 bucks you're sending setting aside for open AI maybe you want to experiment across the different models so this is a really great platform to be able to to do that if that's what you're interested in so similarly within the repo I'm going to include also an example of if you're just looking to have a very simple 20 line implementation of being able to use one of the models so let's say you know you just want to use cloud 2. here's just sort of that boilerplate just stripped down with essentially only the stuff that you need so the other thing that I'll just mention before I close this out is for the API key if you're looking for it very simple you just go to keys in the interface click keys and then you'll be able to generate a key from there and set a limit so hopefully you found this video useful if you did please like comment share and subscribe and otherwise until the next one
Technical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.
Weekly deep dives on AI agents, coding tools, and building with LLMs - delivered to your inbox.
Free forever. No spam.
Subscribe FreeNew tutorials, open-source projects, and deep dives on coding agents - delivered weekly.