Skip to content

Repository files navigation

Gemini Clone Project Setup Guide

If you encounter an error like "API key not valid. Please pass a valid API key." while chatting with the Gemini, please follow these steps:

Get Your API Key

  1. Go to Google AI Studio.
  2. Navigate to the API key section and create a new API key.

Your API key will look something like this: AIzaSyAtpnKGX13bTgmx0l_gQeatYvdWvY_wOTQ

Note: The API is free but has a limited number of usage requests.

Insert Your API Key

  1. Open your project folder in VS Code.
  2. Locate to the script.js file in your project.
  3. Find the API_KEY variable and replace PASTE-YOUR-API-KEY with your actual API key.

Save and Test

  1. Save the script.js file after adding your API key.
  2. Open index.html in your browser to verify that Gemini is working correctly.

If you still get an error or get stuck, feel free to message me on Buy Me a Coffee. https://buymeacoffee.com/codingnepal


Happy coding!

About

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages