API Keys & Models¶
Configuring API Keys¶
From the Chat Panel¶
- Click the gear icon (⚙) in the chat header bar
- Select a provider (Anthropic or OpenAI)
- Paste your API key
- Click Save Key
The status line shows which providers are configured.
Manual Configuration¶
API keys are stored in ~/.lamia/.env. You can edit this file directly:
Changing API Keys¶
To update a key, simply click the gear icon (⚙) in the chat header bar, select the provider, and enter the new key.
Selecting a Model¶
Use the dropdown in the chat header bar. Models appear from three sources, in priority order:
1. Project Models (from config.yaml)¶
If your project has a config.yaml or multiple config.yaml files in case of multi project workspace, all models from the model_chain section are discovered and appear first:
model_chain:
- name: "anthropic:claude-sonnet-4-20250514"
max_retries: 3
- name: "openai:gpt-4o"
max_retries: 2
Lamia Studio discovers config.yaml files in your workspace (up to 4 directories deep) and the global ~/.lamia/config.yaml.
2. Built-in Model List (models.json)¶
After project models, Lamia Studio adds models from a built-in list. This list is fetched from the lamia-ide repository on startup, with a bundled copy as fallback.
Models whose provider has no configured API key show a lock icon (🔒). Configure the key to unlock them.
Model Format¶
Models use the format provider:model-id, for example:
anthropic:claude-sonnet-4-20250514openai:gpt-4oollama:llama3
Switching Models Mid-Chat¶
You can switch models at any time using the dropdown. The next message will use the new model. The backend config is updated automatically.