Connect Your First AI Provider
Apprentice needs at least one AI provider before agents can call a model.
Docker gives Apprentice a controlled runtime for agents. The AI provider gives those agents access to a model. These are separate pieces: Docker runs the agent environment, and the provider handles model inference.
Apprentice is local-first, but the provider you choose determines where model calls go. If you use a local runtime, model calls can stay on your machine. If you use an API, CLI, or subscription provider, that provider receives the prompt and context needed for the model call.
Choose a Provider Type
Apprentice supports several provider types.
API providers:
- OpenAI
- Anthropic / Claude API
- Google Gemini
- DeepSeek
- Mistral
- Kimi (Moonshot)
- GLM (Zhipu)
- Qwen (Alibaba)
CLI and subscription providers:
- Claude Code
- Codex
- Gemini CLI
- ChatGPT Subscription
Local runtimes:
- Ollama
- LM Studio
- Docker Model Runner
For your first setup, choose the provider you already have ready. If you already have an API key, start with that API provider. If you already use Claude Code, Codex, Gemini CLI, or ChatGPT Subscription, start there. If you already run local models through Ollama, LM Studio, or Docker Model Runner, use that.
Open Provider Settings
In Apprentice:
- Open Settings.
- Go to AI Integration.
- Select the provider you want to use.
- Enable the provider.
- Configure the required account, key, or local runtime settings.
You only need one working provider to create your first agent.
API Provider Setup
Use this path for OpenAI, Anthropic / Claude API, Google Gemini, DeepSeek, Mistral, Kimi, GLM, and Qwen.
In the provider settings:
- Enable the provider.
- Keep the default Base URL unless you intentionally use a custom endpoint.
- Enter the provider API key.
- Select Test Connection.
- Refresh or discover models if the provider supports model discovery.
- Choose a Default Model.
- Set the provider as the Default Provider if you want new agents to use it by default.
API providers send model requests to that provider's service. Do not use an API provider for private data unless you are comfortable sending the prompt and relevant context to that provider.
CLI Or Subscription Provider Setup
Use this path for Claude Code, Codex, Gemini CLI, and ChatGPT Subscription.
These providers depend on an account or CLI login instead of a normal API key.
In the provider settings:
- Enable the provider.
- Add an account if required.
- Follow the login or token instructions shown in Apprentice.
- Set the account as default if you have more than one.
- Choose a Default Model.
- Set the provider as the Default Provider if you want new agents to use it by default.
For CLI providers, make sure the CLI tool is installed and authenticated before using it in Apprentice.
Examples:
- Claude Code uses Claude authentication.
- Codex uses Codex authentication.
- Gemini CLI uses Gemini CLI authentication or supported credentials.
- ChatGPT Subscription uses browser login.
Local Runtime Setup
Use this path for Ollama, LM Studio, or Docker Model Runner.
Local runtimes are useful when you want model calls to stay on your machine, assuming the model runtime itself is local and configured that way.
In the provider settings:
- Start the local runtime first.
- Enable the provider in Apprentice.
- Confirm the local server URL.
- Select Test Connection.
- Refresh or discover models.
- Choose a Default Model.
- Set the provider as the Default Provider if you want new agents to use it by default.
Common defaults:
- Ollama:
http://localhost:11434 - LM Studio:
http://localhost:1234 - Docker Model Runner:
http://localhost:12434/engines
If no models appear, make sure the local runtime is running and has at least one model installed or loaded.
Set The Default Provider
The default provider is the provider Apprentice uses when creating or running agents unless you choose something else.
In the provider settings:
- Enable the provider.
- Choose a model.
- Turn on Default Provider.
You can change the provider or model later. For the first run, keep it simple: one provider, one model, one small agent.
Verify The Provider Works
After setup, create a simple agent or use an existing one and send a basic message:
Reply with one sentence confirming that the model is working.
If the response works, the provider is connected.
Then try a slightly more realistic request:
Summarize what you can help me with based on your current agent configuration.
Troubleshooting
If the provider does not appear connected, check that it is enabled in Settings.
If an API provider fails, verify the API key, Base URL, and account limits with that provider.
If a CLI provider fails, make sure the CLI is installed, available from your system path, and logged in.
If a local runtime fails, make sure the runtime is running before starting the agent.
If models do not appear, refresh model discovery after fixing the connection.
If the wrong provider is used, check the Default Provider and Default Model settings.
Next Step
After connecting a provider, create your first agent.