Connect a provider

API keys for Anthropic, OpenAI, Gemini and the rest: where they go, where they are kept, and which model a session uses.

 Ask a question

Providers

An API key connects Sylphyx to a provider. Requests go from your computer straight to that provider, which bills you at its own prices. Pick one to see the lines for it:

  1. Get a keyconsole.anthropic.com/settings/keys
  2. Keep it in the keychain
    sylphyx login anthropic
    or for one terminal only, in a variable:
    $env:ANTHROPIC_API_KEY = "your key"
  3. Use it
    sylphyx --model anthropic
    which picks claude-sonnet-5-5; name another as anthropic/MODEL.

All of them at a glance: the name you use in --model and /model, and the variable that can hold the key.

ProviderNameKey variableModel when none is named
AnthropicanthropicANTHROPIC_API_KEYclaude-sonnet-5-5
OpenAIopenaiOPENAI_API_KEYgpt-6.1-sol
OpenRouteropenrouterOPENROUTER_API_KEYanthropic/claude-sonnet-5.5
Google GeminigoogleGEMINI_API_KEYgemini-4-argon
xAI GrokxaiXAI_API_KEYgrok-4.7
DeepSeekdeepseekDEEPSEEK_API_KEYdeepseek-flash
MistralmistralMISTRAL_API_KEYmistral-medium-latest
GroqgroqGROQ_API_KEYopenai/gpt-oss-120b

In the app

Settings (Ctrl+,), Connections, then API keys. Each provider has a line: paste the key into its field and press Enter. Get a key opens the provider's page for one, and Remove deletes a stored key. The badge beside the name says where the key comes from: "key in keychain", "key from environment" or "no key".

In the CLI

sylphyx login anthropic

It asks for the key without showing it, stores it, and checks it at once by asking the provider for its models: "The key works: … models to choose from", or "The provider did not accept the key", with the provider's reason. sylphyx logout anthropic removes it. Any name from the table works in place of anthropic.

/config and /settings do not take keys; they choose what to use with them. To make a model the default for every session:

/config model openai/gpt-6.1-sol

Where keys are kept

  • Windows: Credential Manager, as a generic credential named sylphyx:anthropic (and so on), readable by your user only.
  • macOS: the login keychain. Linux: the desktop's Secret Service through secret-tool, or, where there is none, a file only your user can read.
  • The settings file, config.json, never holds a provider key. The app and the CLI share the same keys and settings.

Which model a session uses

The first of these that names one, top to bottom:

  1. --modelfor this run only
  2. SYLPHYX_MODELthe environment variable
  3. model in the settings/config model … saves it
  4. The first provider with a keyin the table's order; a ChatGPT sign-in comes right after OpenAI
  5. A local server that answersLM Studio, then Ollama

Naming only a provider, as in --model groq, takes the model in the table's last column. sylphyx models shows what is connected; sylphyx models openai lists every model the key can use.