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

# Gemini - AI Studio

Use Google's AI Studio to access the Gemini and Gemma models.

## Authentication

Set your `GOOGLE_API_KEY` environment variable. You can get one [from Google here](https://ai.google.dev/aistudio).

<CodeGroup>
  ```bash Mac theme={null}
  export GOOGLE_API_KEY=***
  ```

  ```bash Windows theme={null}
  setx GOOGLE_API_KEY ***
  ```
</CodeGroup>

## Example

Use `Gemini` with your `Agent`:

<CodeGroup>
  ```python agent.py theme={null}

  from phi.agent import Agent, RunResponse
  from phi.model.google import Gemini

  agent = Agent(
      model=Gemini(id="gemini-1.5-flash"),
      markdown=True,
  )

  # Get the response in a variable
  # run: RunResponse = agent.run("Share a 2 sentence horror story.")
  # print(run.content)

  # Print the response in the terminal
  agent.print_response("Share a 2 sentence horror story.")
  ```
</CodeGroup>

## Params

<Snippet file="model-google-params.mdx" />
