---
title: "Google's AI Studio API Service"
output: rmarkdown::html_vignette
vignette: >
  %\VignetteIndexEntry{Google's AI Studio API Service}
  %\VignetteEngine{knitr::rmarkdown}
  %\VignetteEncoding{UTF-8}
---

```{r, include = FALSE}
knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
```

### Creating an Account in Google's AI Studio

- Visit [Google's AI Studio website](https://makersuite.google.com) and sign up.
- Complete the verification process.

### Accessing Google PALM API

- In your Google Cloud Console, enable the PALM API.
- Create an API key as per the instructions in [Google's API documentation](https://ai.google.dev/docs).

### Setting the Google AI Studio API Key in .Renviron

To modify the `.Renviron` file:

```{r}
#| eval: false
require(usethis)
edit_r_environ()
```

For a persistent setting, add the following line to `.Renviron`, replacing `"<APIKEY>"` with your actual Google PALM API key:  

```bash 
PALM_API_KEY="<APIKEY>"
```

Save the file and restart your R session for the changes to take effect.

**Caution:** Be careful not to expose `.Renviron` in public repositories or version control systems to protect your API key.
