Skip to main content

Store AI credentials

Goal: save a provider's API key once, in the OS keychain. Every translate, qa or rewrite step that needs the key finds it there, and the committed recipe never holds it. You can add the key in Kapi Desktop's AI Models settings or with kapi credentials on the command line; both write to the same store.

For how providers work and how kapi resolves a key, see Choose a translation provider.

Outdated recording

The interface has changed since this was recorded. The workflow it demonstrates still applies, but some screens and labels differ from the current release. The clip shows an earlier settings layout. Terms and Content Memory sit under Context, and the AI Models tab shows which model runs are using. The clip covers the whole settings area (appearance, providers, and plugins), so it ranges beyond credentials and does not follow a key through to a translate step.

Steps​

  1. Check whether you need a key. On first open, the Connect your AI card offers what it detects: a Claude Code sign-in (uses your Claude subscription) or a local Ollama model. Either takes one click and stores nothing. The steps below are for API keys.
  2. Add the credential. From Settings → AI Models, add a credential: pick the provider (Anthropic, OpenAI, Gemini, …) and paste its key.
  3. Stored in the keychain. The key is saved to the OS keychain and never written to the kapi.yaml recipe, so the recipe stays safe to commit and share.
  4. Use it. A translate step (in the flow editor) or any AI-backed tool finds the credential itself, so you never type a key on a command line.

Where the key lives​

Keys live in the OS keychain, and the recipe carries only the provider name. The app shows which providers are configured. The CLI's kapi credentials uses the same keychain store, so a key you add here is available to command-line runs too.

Next​