Skip to main content

Menu

Sign In Register

Connect Your First AI Provider

Connect the first AI provider in Apprentice, choose between API providers, CLI or subscription providers, and local runtimes, then verify the model works.

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:

  1. Open Settings.
  2. Go to AI Integration.
  3. Select the provider you want to use.
  4. Enable the provider.
  5. 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:

  1. Enable the provider.
  2. Keep the default Base URL unless you intentionally use a custom endpoint.
  3. Enter the provider API key.
  4. Select Test Connection.
  5. Refresh or discover models if the provider supports model discovery.
  6. Choose a Default Model.
  7. 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:

  1. Enable the provider.
  2. Add an account if required.
  3. Follow the login or token instructions shown in Apprentice.
  4. Set the account as default if you have more than one.
  5. Choose a Default Model.
  6. 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:

  1. Start the local runtime first.
  2. Enable the provider in Apprentice.
  3. Confirm the local server URL.
  4. Select Test Connection.
  5. Refresh or discover models.
  6. Choose a Default Model.
  7. 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:

  1. Enable the provider.
  2. Choose a model.
  3. 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.