April 2, 2024, 4:51 p.m. | Sh Raj

DEV Community dev.to




Gemini-API

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



Contribute Here


Powered by WhollyAPI


https://dev.to/sh20raj/google-gemini-free-api-269o/edit







let prompt = "I love you";

async function fetchResponse(prompt) {
const response = await fetch('https://gemini-apis.vercel.app/api/?prompt='+encodeURIComponent(prompt)+'');
const data = await response.text();
console.log(data);

}

fetchResponse(prompt);







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 …

api async chatbot chatbot development data development endpoints example fetch free function gemini gemini model google googlecloud google gemini javascript love prompt text will

Founding AI Engineer, Agents

@ Occam AI | New York

AI Engineer Intern, Agents

@ Occam AI | US

AI Research Scientist

@ Vara | Berlin, Germany and Remote

Data Architect

@ University of Texas at Austin | Austin, TX

Data ETL Engineer

@ University of Texas at Austin | Austin, TX

Data Engineer

@ Kaseya | Bengaluru, Karnataka, India