- Go to https://aistudio.google.com/apikey to create a free API key
- Save to
~/.gemini.env:GEMINI_API_KEY=你的key - To use it in Claude, you can call it via a Skill script
Test
curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent?key=$GEMINI_API_KEY" -H "Content-Type: application/json" -d '{"contents":[{"parts":[{"text":"Hello"}]}]}'
⚠️ The Gemini API key is created in AI Studio and does not require a credit card.