Skip to content

(setup): Obtain free gemini API key and verify via curl #80

@07CalC

Description

@07CalC

context

we want to ensure contributors can successfully obtain and use a free gemini api key

goal

  • obtain free gemini api key
  • make a test request using curl
  • share proof that the request works

steps

  1. get a free Gemini API key from google
  2. use the key to make a simple API request via curl
  3. capture a screenshot of:
    • the curl command
    • the successfull responnse

example

example curl request:

curl "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-flash:generateContent" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H 'Content-Type: application/json' \
  -X POST \
  -d '{
    "contents": [
      {
        "parts": [
          {
            "text": "what is the capital of india"
          }
        ]
      }
    ]
  }'

replace $GEMINI_API_KEY with the api key you got from google ai studio

deliverables

  • screenshot showing
    • working curl command
    • successful API response
  • screenshot image in extra/ with name your-github-username.png/jpg/webp whatever

notes

  • make sure not to commit or export your API key publicly
  • this is a setup and verification task
  • keep screenshots clear and readable
  • it's an open for all task, so everyone is recommended to do
  • this API key will be used later

Metadata

Metadata

Assignees

No one assigned

    Labels

    Points: 20open-for-allAny one can work on it without getting assigned, every PR can merge

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions