From the course: Getting Started with the Google Gemini API
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Using the REST API - Gemini Tutorial
From the course: Getting Started with the Google Gemini API
Using the REST API
- [Instructor] In this video, we'll be performing our first demonstration of using the Gemini API by making a request to it using the rest API. In order to do this, we will need an HTTP client to make the HTTP call to the API. While we can do this from our command line using a utility like cURL, that's cURL, I've chosen to use the Postman software for a more visual experience. You can download Postman for free for any platform of your choice at their website. Once downloaded, open up Postman, and let's get started with our demo. In this demo, we'll be sending a prompt to the Gemini Pro model to generate a response using the Generate content method. If we navigate to the generate content documentation for the model's resource, we'll see that this is a post request to be sent to the URL using the standard format that we described in a previous video. So the first thing we'll be doing in Postman is to set the request method for this request to post. Next, let us type in our request URL…