Using API keys

API keys let Glyph call cloud models from OpenAI, Anthropic, Google, OpenRouter, or an OpenAI-compatible server. Keys are per space and stay with that Space. Open Settings → AI with a Space open and set Connection type to API.

Supported providers

  • OpenAI
  • Anthropic
  • Google
  • OpenRouter
  • OpenAI compatible: any server that speaks the OpenAI-style API

Pick the provider you use under Provider, then set the key for the current Space. Enable AI features so the Glyph AI panel can use the key.

Set, update, or clear a key

For each provider:

  1. Open Settings → AI for the Space.
  2. Choose the provider under Provider.
  3. Click Set key to add a key, Update key to replace one, or Clear to remove the stored key.

The key status shows Active when a key is stored and Missing when none is.

Keys do not copy to other Spaces. Configure each Space you use with AI. Clear a key if you shared a machine or rotated credentials at the provider.

OpenAI compatible

For OpenAI compatible endpoints:

  1. Enter the Base URL for the server. The default is http://localhost:11434/v1.
  2. Turn on Allow local network if the server runs on your machine or LAN (for example LM Studio).
  3. Set or clear a key if the server expects one.

Use this path for custom gateways and local OpenAI-style servers. For Ollama and llama.cpp defaults, see the Local models guide.

What keys are for

API keys power chat (and create mode when tools are on) through those providers. They are separate from agent CLIs:

  • Agents (Codex, Cursor, Grok, OpenCode, Claude Code, PI): no Glyph-stored provider key; use the CLI’s own sign-in.
  • API providers: use Set key / Update key / Clear here.

For the full chat, tools, and @ context flow, see the Glyph AI overview.

Per-space storage

Glyph stores API credentials locally with the Space. A copy of the Space’s private metadata can include those credentials. They do not become a global Glyph cloud login.

Tips

  • After Set key, open the AI panel and Send a short message to confirm the provider responds.
  • Update when the provider rotates keys; Clear when you retire a Space or hand off a machine.
  • OpenRouter is useful when one key should reach many upstream models; configure it like any other provider key.