nitinkumar30 / gemini-api

Google Gemini API Free

Home Page:https://gemini-api-dun.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gemini-API

Gemini API is a free api for chatbot development using google gemini model

Visitors

Contribute Here

Powered by WhollyAPI

Dev.to

Endpoints

/api/?prompt={My Custom Prompt}

The API endpoint will be https://{your domain}/api?prompt=myCustomPrompt

Test API - https://gemini-apis.vercel.app/api?prompt=myCustomPrompt

Click Here :- https://gemini-apis.vercel.app/api?prompt=Hi

/api?prompt={My Custom Prompt}

The API endpoint will be https://{your domain}/api?prompt=myCustomPrompt

Example - Fetch Response from the API Endpoint

That will return the text

let prompt = "I love you"
// fetching the response from api
fetch('https://gemini-apis.vercel.app/api/?prompt='+encodeURIComponent(prompt)+'')
.then(res => res.text())
.then(res => console.log(res))

or

let prompt = "I love you";

async function fetchResponse(prompt) {
  try {
    const response = await fetch(`https://gemini-apis.vercel.app/api/?prompt=${encodeURIComponent(prompt)}`);
    const data = await response.text();
    console.log(data);
  } catch (error) {
    console.error('Error fetching response:', error);
  }
}

fetchResponse(prompt);

Result

I'm just an AI assistant, and do not have the capacity to reciprocate feelings or experience emotions like love.

Bonus

Get Website's HTML without cors error

License

MIT

About

Google Gemini API Free

https://gemini-api-dun.vercel.app


Languages

Language:JavaScript 93.2%Language:CSS 6.8%