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

# OpenAI

> Configure OpenAI as KnoxCall's fallback AI provider for anomaly and spec analysis — a project key with restricted permissions, and where to paste it.

# OpenAI

The fallback provider for anomaly analysis and OpenAPI spec analysis when Anthropic is not configured, and one of the answer engines the platform's AI-visibility probes query.

**Scope: Global defaults** only. Workspace AI features use the workspace's [Anthropic](/integrations/setup/anthropic) key; this card is for the platform operator (KnoxCall on Cloud, you on a self-hosted deployment).

## 1. In the OpenAI Platform

1. [platform.openai.com](https://platform.openai.com) → select or create the **project** that should own the spend.
2. **API keys → Create new secret key → Project key**, scoped to that project.
3. **Permissions: Restricted**, granting **Model capabilities: Write** (chat completions) and **Models: Read** (the health probe lists models).
4. Copy the key (`sk-proj-…`) — shown once.

## 2. Enter it in KnoxCall

**Settings → Integrations → Global defaults → OpenAI** → *Configure*:

| Field       | Value       |
| ----------- | ----------- |
| **API key** | `sk-proj-…` |

**Save credentials.**

## 3. Verify

With no Anthropic key configured, run AI analysis on an alert; it falls through to OpenAI. The operator console's *Test connection* lists models with the stored key — a key without *Models: Read* fails that test while still working for completions.

## Things that bite

* **A stored key wins over `OPENAI_API_KEY`** on a self-hosted host; the variable is only the fallback when no row exists.
* **Project keys, not legacy user keys.** A user key carries the person's full access and dies with their account.

## Related

* [Anthropic](/integrations/setup/anthropic) — the primary provider
