# Inchframe v109 API Key Setup

Inchframe is a bring-your-own-key local AI video workflow app. A clean first install should not include saved API keys.

## AI API keys for prompt and generation helpers

Inchframe does not ship with API keys. For a clean first install, create your own provider keys and add them in **Settings > API Management**, or set them as Windows environment variables before starting Inchframe.

### OpenAI key

1. Sign in or create an OpenAI Platform account: https://platform.openai.com/
2. Create or manage API keys here: https://platform.openai.com/api-keys
3. Copy the key when it is created. OpenAI only shows the full secret once.
4. Add it in Inchframe as your OpenAI key, or set this environment variable:

```bat
setx OPENAI_API_KEY "your_openai_key_here"
```

### Google Gemini key

1. Sign in or create access through Google AI Studio: https://aistudio.google.com/
2. Create or manage Gemini API keys here: https://aistudio.google.com/apikey
3. Gemini keys are tied to a Google Cloud project. If you use an existing Google Cloud project, import/select the project in AI Studio before creating the key.
4. Add it in Inchframe as your Google/Gemini key, or set one of these environment variables:

```bat
setx GEMINI_API_KEY "your_gemini_key_here"
```

or:

```bat
setx GOOGLE_API_KEY "your_gemini_key_here"
```

### Key safety

- Do not paste real API keys into shared screenshots, support tickets, public GitHub repos, Discord, Slack, or email.
- Prefer environment variables when possible.
- If a key is exposed, delete/revoke it in the provider dashboard and create a new one.
- Restart your terminal/app after using `setx` so Windows picks up the new environment variable.

## Where keys are used in Inchframe

- OpenAI key: prompt generation, prompt rewriting, text helper features, and any configured OpenAI-backed generation helpers.
- Gemini key: Google Gemini prompt/helper features and any configured Google-backed generation helpers.
- ComfyUI/LTX local video generation still depends on your local ComfyUI setup, local models/assets, GPU/system, and the LTX/IAV workflow test.

## Recommended first-run order

ComfyUI opens -> LTX/IAV template loads -> Download all assets completes -> short IAV test renders inside ComfyUI -> provider API keys are added or environment variables are set -> Inchframe System Check passes -> small Inchframe test project renders.
