How to call Google Gemini API
It is only one which provide free-limit used of LLMs API
Published in
Apr 18, 2024
Gemini API
Get API key
- click Create API key
- get key
3. you can test the key by curl command below
curl \
-H 'Content-Type: application/json' \
-d '{"contents":[{"parts":[{"text":"Write a story about a magic backpack"}]}]}' \
-X POST 'https://generativelanguage.googleapis.com/v1beta/models/gemini-pro:generateContent?key=YOUR_API_KEY'
change YOUR_API_KEY
to you key then send it to make sure API is work fine