From 8c57e7572b00fe97b251f82aa636f747c1fc008c Mon Sep 17 00:00:00 2001 From: nlace <167659833+NLACE-COM@users.noreply.github.com> Date: Thu, 5 Jun 2025 19:11:30 -0400 Subject: [PATCH] docs: document OpenAI variables --- .env.example | 5 +++++ README.md | 9 +++++++++ 2 files changed, 14 insertions(+) create mode 100644 .env.example diff --git a/.env.example b/.env.example new file mode 100644 index 000000000..9a37d7e3e --- /dev/null +++ b/.env.example @@ -0,0 +1,5 @@ +HEYGEN_API_KEY="your Heygen API key" +NEXT_PUBLIC_BASE_API_URL=https://api.heygen.com +# Optional OpenAI integration keys +OPENAI_API_KEY="your OpenAI API key" +NEXT_PUBLIC_OPENAI_API_KEY="your OpenAI API key" diff --git a/README.md b/README.md index b647533a3..2e1cf64af 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,15 @@ Feel free to play around with the existing code and please leave any feedback fo 6. Run `npm run dev` +### Environment variables + +Copy `.env.example` to `.env` and fill in your credentials. The demo understands the following keys: + +- `HEYGEN_API_KEY` – used by `app/api/get-access-token/route.ts` to request streaming tokens. +- `NEXT_PUBLIC_BASE_API_URL` – base URL for HeyGen's API (`https://api.heygen.com` by default). +- `OPENAI_API_KEY` – optional key for sample OpenAI integrations. +- `NEXT_PUBLIC_OPENAI_API_KEY` – optional client-side key for OpenAI demos. + ### Starting sessions NOTE: Make sure you have enter your token into the `.env` file and run `npm run dev`.