# Groq Python SDK Integration

> Use Groq's Python SDK to integrate with Helicone to log your Groq usage.

import LegacyWarning from "/snippets/legacy-provider-warning.mdx";

<LegacyWarning />

<Note>

Depending on the model you are using, you may need to adjust the base URL.
For most cases with Groq, the base URL will be `https://groq.helicone.ai/openai/v1`.

However, in some cases, you may need to use `https://groq.helicone.ai/v1`.

</Note>

<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="Set HELICONE_API_KEY as an environment variable">
```javascript
HELICONE_API_KEY=<your API key>
```
  </Step>
  <Step title="Modify the base path and add a Helicone-Auth header">
<CodeGroup>

```Python Groq SDK
client = Groq(
    api_key=os.environ.get("GROQ_API_KEY"),
    base_url="https://groq.helicone.ai/openai/v1",
    default_headers={
        "Helicone-Auth": f"Bearer {os.environ.get('HELICONE_API_KEY')}",
    }
)
```

</CodeGroup>

  </Step>
</Steps>
