Only API Documentation Tutorial You Will Ever Need β
Create an App's Backend with AIπ
2025-01-14
Transcript β
[00:00] this video is going to be the only video that you ever have to watch when it comes to API documentation I'm going to show you a method using artificial intelligence that's going to allow you to use any API documentation even if you have no coding experience because we don't like spending thousands of dollars on a developer they said they're going to do the API integration it takes weeks they're slow not doing it well let's just do it with AI welcome back y'all in this video I'm going to show you a method that was only possible within the last year or two years if you looked up any API documentation tutorial pre 2022 this wasn't possible what I'm about to show you therefore let me show you the
[00:30] new age here and how to do it easily with AI to best showcase this I'm going to give you two different use cases the first one is going to be with zapier this applies to any no code automation software whether it's make or pipe dream essentially what I'm going to show you is I'm going to show you how to integrate any type of API through zapier in their web hook feature I'll also be explaining these terms a lot simpler such as what's a web hook what's a git what's a post everything like that the Second Use case I'm going to show you is how to do it within a code IDE therefore if you do code in this manner how do we access different API documentation in
[01:01] this kind of context so some of y'all are going to be here for this and then some of y'all are going to be here for this and then the real ones out there are going to be there for both so let's jump in I'm also doing this video as this was a reoccurring question in my school Community here if I'm going to give a little shout out you want exclusive content or just talk to me personally and ask me very specific questions description down below some of y'all are like this is my first video with this dude why the heck would I want to talk to him okay it's okay you don't have to talk to me let's do it first off here we're going to start zapier so because of the fact that I just want to show you the use case of connect in any API the trigger here doesn't really
[01:32] matter so we're just going to do a scheduler also with zapier what's nice is that when I show you this process it's going to become very clear on whatever platform you're trying to integrate whatever software essentially how to approach this because of the fact of how zapier structures his web hooks is very very no code UI friendly time of day doesn't matter 12:00 a.m. test trigger perfect okay stage one here is done let's jump into the web hook and why you even clicked on this video web hooks first off what the heck is a web hook all I want you to think of when you hear the term web Hook is this is how software a and software B communicate
[02:04] with each other here's a simpler way of saying this let's say I have an image in my Google Drive folder I want to take that image from my Google Drive folder and post it on my Instagram we can do this by simply taking the image file here sending a web hook in the API documentation of Instagram and posting there using something like zapier therefore when doing this we have a couple of different options here we have custom request get post put if you're just starting off here and basically for most use cases this is all you're going
[02:34] to select either post get or customer request what is a post Corbin let's say I'm the mailman and I give you an envelope that's post I'm giving you data what's get Corbin let's say I'm a mailman and I take your mail out of your mailbox I'm getting it I'm taking that data should I used a whiteboard for that scenario I don't think so customer request same deal but this is when it comes to API documentation that needs to be a little bit more open and this will make more sense when we jump into this let's do a web hook together and the API
[03:06] documentation we're going to look at today is going to be open AIS but the process and steps I'm about to show you can be reproduced for any API documentation which basically means type in whatever your software name is so let's say it's MailChimp MailChimp API documentation once you do that replace MailChimp with whatever software you care about you're looking at hit search and then you should see something like this once you have your API documentation and you know a software you want to connect with let's go to a Chad gbt does this work with Claud
[03:37] Corbin yes why are you using claw cuz I don't want to I'm going to show today's video in 40 in theory though I would suggest if you have access to o01 or 0 and mini opt for those but I'm not doing it because I think the free plan still has access to 40 so this is more Universal we're going to say this we're going to first put in we are looking at open aai API documentation you would say we are looking at x API documentation whatever you're looking at what are you looking at right now are you even watching this video or are you just listening on audio from here here's what we need to add first thing authentication essentially do you even
[04:09] own this do you have the key can you even open the door am I that mailman but I don't have the key so therefore I can't give you the data I'm going to go authentication here and all I want you to do don't even read it copy select drag and just copy everything command C control C come back over here paste first step down go to whatever you want to do functionally within your API documentation so for example they call them endpoints audio CH great speech the chat completion object whatever this is going to be very clear in the sense of
[04:40] okay I go to chat create chat completion what does this do you would go to whatever your endpoint is and be like okay creates a model response for give chat conversation and you can obviously learn more point being is that just get to whatever endpoint you want to do so the end point that you don't want to pay that up work Fiverr or freelancer to do basically from here one of the most fun m al parts of any API documentation is going to be that URL which if you've never done anything in development that looks confusing as heck you're like what the heck is going on there is that like a a weird Instagram no this is
[05:11] essentially how we communicate with different softwares based in different Cloud areas in in the cloud okay so first thing we're going to do is we're going to copy everything everything Corbin everything I'm going to grab my cursor here and just drag drag drag drag all the way till we are done here so obviously when I do this I picking up information that probably isn't even that relevant so that's probably good right there I would say like 60% of that is just not relevant but if you've never done API documentation or development copy everything it's better to copy more
[05:43] than not copy enough which you for sure weren't told in school finally typically within documentation this isn't always there but this is kind of like a brownie point you want to get extra credit if you have like a nice little code example request here go to default go to JS go to just just go to default and copy it so here is what we just did two major things first thing we gave the most upto-date information when it comes to this specific software's API why I say that is that you don't want to do this entire
[06:13] process like you know what Corman I don't want to copy the web page you know what I want to do I simply just want to type in we're trying to do a chat completion request with open AI That's all you want to type in you don't do that because these models aren't trained to the most upto-date information so you're shooting yourself in the foot second thing that you just learned here is that if you have zero clue on how to code or development or any of this jargon don't worry copy more paste more so then the last step here is going to be specifically what you wanted to do with that API so for me I'm trying to do
[06:45] a zap your web hook therefore describe in detail or just one sentence like me okay with this code help me do a zapier web hook for a chat completion please output all steps and code you need more information to put there put more information this strategy if you're running to issues with 40 Works tremendously better with 01 mini and o proo o proo Corbin I don't know if I want o proo check out this video right there okay just check it out I go over whether oo mode is good or not so now that we're here let's walk through the steps I'm gonna walk through these steps as if like I have no clue what's going
[07:16] on and just listening to gbt 28 so it's like okay create his app yeah we did that come down here okay so it wants me to prepare an API call here wants me to do a post request got it so I'm coming down here here we go action web po by zappier we got that far custom request okay so it wants me to do a custom request got it continue it's telling me the method I should do is post all right let's come down here wa we got post and then the URL I should grab is this one so I'm just going to copy this paste okay cool and then it's telling me the headers or application Json
[07:46] authorization is be your open AI key replace with your actual API key okay notice it didn't mention data pass through so what should you do ignore it so then coming down here it was like headers headers okay content type I'm G copy this paste it there and then I'll copy this as well paste it there then it's telling me authorization Okay add value set authorization and then it wants me to do my open AI key okay we can do that so whatever API documentation you're using you probably already created an account
[08:18] if you haven't that's kind of mandatory so just create an account they're typically free specifically when it comes to open AI you're going to go to your settings and just hit API Keys all you need to do if you can't find where to create your API key is simply put in your software's name and put in where is my API key and they'll have like little help articles so I'm here I'm about to create my API key create new secret key I'm just going to put in burner here as I'm going to delete this and then typically an API key will ask for permissions if you're actually using this in development you're going to say all so that you don't run into any dumb errors where it's just like we don't
[08:48] have access to this but this is an API key create secret key once you create it make sure to copy it have it it goes without saying obviously don't share it and you know what I'm just noticing recently I'm noticing a lot of comments like hey Corbin great video can you help me open my coin usdt wallet here is my seed like stop scamming people okay don't put that in the comments you little bot no bot no good so with this API key we're going to put it right here I'm going to Simply paste it right here before I do that though let's keep walking through the steps here so the next one is this is our data this is the
[09:19] post request notice data okay cool paste with that done the next step you may have for example here is let's say we paste a data and you want to understand what's actually happening you have two options either just obviously talk to Chad gbt or Claud or whatever and be like what does it mean role what does it mean content what does it okay I think you should know what model is that's like gbt 3.5 whatever but this is interchangeable and it's even shown within the documentation itself like hey for model if you want to do 3.5 use 3.5 like for example here I'm going to be
[09:51] like what is 2 plus two because the API documentation and what we're accessing in this context is simply just a chat completion request which is essentially what we've been doing here but through API let's see if it works wait corpin corpin corpin slow down you didn't do anything about unflatten or basic off why gbt didn't tell me to do anything so let's see if it works so I actually did run into an air and I know what the air was but let's just say you didn't essentially the error I ran into is I didn't add Bearer let's say you didn't I'm like oh crap I ran into an air what the heck do I do copy come down to the
[10:23] chat and be like hey I ran this but I got Hast the air I could have easily just edited out that little air part part but I left it in purposely I want to show you how I troubleshoot through errs so that if you run to errs you know exactly what to do and all I did was this hey ran into this past the air watch this so the first troubleshoot is fix your API key but I already created it I know it's correct maybe there's a possibility of permissions tabs but we saw it was all but there we go that's the answer double check that Bearer and the API key are separate in a single space you're right essentially bear
[10:55] space and then we'll put our API key and there we go now let's see if we got the answer corre it should be four 2 + 2 = 4 boom make sure you leave a like if you felt like you learned something up to this point let me show you how to do this in the code version or in like the integrated development version some of yall about to click off right now cuz you're like you know I just got my answer I'm never going to click a video from Corbin again I'm done chill out if you see another thumbnail like this just click it show some love that's cool there let me show you real quickly how I would approach it in the context of coding it out essentially we're in the same situation here in the sense of
[11:26] providing initial context of the documentation so if I scroll all the way back up in this chat remember that we pasted the exact part we cared about and just provided it all in this initial chat I'm going to go and edit this same situation here but if we come down to what we're actually doing that changes because we're not doing zap your web hook anymore so if the use case changes we simply going to be okay we want to integrate this into a JS file in our react Bas app whatever your situation is put it there I will now provide the code file please add it for any variables needed just make it hardcoded with fixed text for now I don't want to put the
[11:57] entire code file with the the initial prompting of the API documentation just us pacing it over just to mitigate confusion and Clarity from this chat here on out and I'll reiterate again this method works way better for o1 mini 01 but it still works for o so first off we establish what we want to do and then our next chat will just be the entire code file that we care about it's going to start rambling here stop rambling so we're going to stop it early sometimes you do off chat gbt and then when I come to my product JS here for example come back over here I'mma paste the entire file here and then you would obviously
[12:28] give more context of like why I'm using this for now I'm just going to let it push it through and integrate into my code hit enter so it's getting sidetracked so I'm going to Simply get it back on track integrate a chat completion API request in this code and then output the entire JS file that last part is extremely important it's annoying when chat gbt only gives you a snippet ask for the entire file what's amazing about this is this will give you structuring and you can kind of just plug and play from here so we're going to get this entire file real quick back then when you had to code this all by hand that was not fun that was not fun copy code paste code code scroll up here
[13:01] there we go this is just a quick way of showing you how to get correct structuring when providing all the logic for that specific API documentation now let me show you something really cool if you stuck to this point of this video especially in this context I'll make sure I link this video at the end and in the description down below this is a 2hour and 30 minute video that shows you everything you would ever want to do when it comes to back-end development integrated with front end what do I mean by this function calling with API documentation storage authentication it's all in that 2hour
[13:31] and 30-minute video this is going to be a little bit more complex and you might be like why is this so long Corbin that is because for me to go over complex topics I had to break this down into like 710 episodes there's another video on my channel that's like 3 hour and 30 minutes long but that's more for front end and coding out web apps which you can check out as well if you care that just about does it though so make sure to leave a like if you felt like you learn something in today's video that covers everything you need to know about API documentation and using AI to do it if you are running into issues you're running into walls trust me this can do it and sometimes just really prompting
[14:02] it and being like you know what explain it to me like I'm in fifth grade can really help so without further Ado I'll see you in the next video API documentation to random videos that's my face I'll see you in the next video