API keys

Quickly test the Gemini API

API quickstart guide

      curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash:generateContent?key=GEMINI_API_KEY" \
-H 'Content-Type: application/json' \
-X POST \
-d '{
  "contents": [{
    "parts":[{"text": "Explain how AI works"}]
    }]
   }'
    

Your API keys are listed below. You can also view and manage your project and API keys in Google Cloud.

Plan Information

Free of charge

API key
Actions

Remember to use API keys securely. Don't share or embed them in public code. Use of Gemini API from a billing-enabled project is subject to pay-as-you-go pricing.