> ## Documentation Index
> Fetch the complete documentation index at: https://docs.helicone.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini AI cURL Integration

> Use cURL to integrate Gemini AI with Helicone to log your Gemini AI usage.

<Warning>
  This integration method is maintained but no longer actively developed. For the best experience and latest features, use our new [AI Gateway](/gateway/overview) with unified API access to 100+ models.
</Warning>

## Proxy Integration

<Steps>
  <Step title="Create an account + Generate an API Key">
    Log into [helicone](https://www.helicone.ai) or create an account. Once you have an account, you
    can generate an [API key](https://helicone.ai/developer).
  </Step>

  <Step title="Create Google Generative AI API Key">
    Visit the [Google Generative AI API Key](https://aistudio.google.com/app/apikey) page.
    Follow the instructions to create a new API key. Make sure to save the key as you will need it for the next steps.
  </Step>

  <Step title="Set API keys as environment variables">
    ```bash theme={null}
    export HELICONE_API_KEY=<your Helicone API key>
    export GOOGLE_GENERATIVE_API_KEY=<your Google Generative AI API key>
    ```
  </Step>

  <Step title="Send a request using cURL">
    Use the following cURL command to send a request to the Google Generative AI API through the Helicone proxy:

    ```bash theme={null}
    curl --request POST \
      --url "https://gateway.helicone.ai/v1beta/models/$MODEL_NAME:generateContent?key=$GOOGLE_GENERATIVE_API_KEY" \
      --header "Content-Type: application/json" \
      --header "Helicone-Auth: Bearer $HELICONE_API_KEY" \
      --header "Helicone-Target-URL: https://generativelanguage.googleapis.com" \
      --data '{
        "contents": [{
          "parts":[{
            "text": "Write a story about a magic backpack."
          }]
        }]
      }'
    ```
  </Step>
</Steps>
