content/manuals/ai/docker-agent/model-providers.md
To run Docker Agent, you need a model provider. You can either use a cloud provider with an API key or run models locally with Docker Model Runner.
This guide covers cloud providers. For the local alternative, see Local models with Docker Model Runner.
Docker Agent supports these cloud model providers:
Anthropic provides the Claude family of models, including Claude Sonnet and Claude Opus.
To get an API key:
Set your API key as an environment variable:
$ export ANTHROPIC_API_KEY=your_key_here
Use Anthropic models in your agent configuration:
agents:
root:
model: anthropic/claude-sonnet-4-5
instruction: You are a helpful coding assistant
Available models include:
anthropic/claude-sonnet-4-5anthropic/claude-opus-4-5anthropic/claude-haiku-4-5OpenAI provides the GPT family of models, including GPT-5 and GPT-5 mini.
To get an API key:
Set your API key as an environment variable:
$ export OPENAI_API_KEY=your_key_here
Use OpenAI models in your agent configuration:
agents:
root:
model: openai/gpt-5
instruction: You are a helpful coding assistant
Available models include:
openai/gpt-5openai/gpt-5-miniGoogle provides the Gemini family of models.
To get an API key:
Set your API key as an environment variable:
$ export GOOGLE_API_KEY=your_key_here
Use Gemini models in your agent configuration:
agents:
root:
model: google/gemini-2.5-flash
instruction: You are a helpful coding assistant
Available models include:
google/gemini-2.5-flashgoogle/gemini-2.5-proYou can use the openai provider type to connect to any model or provider that
implements the OpenAI API specification. This includes services like Azure
OpenAI, local inference servers, and other compatible endpoints.
Configure an OpenAI-compatible provider by specifying the base URL:
agents:
root:
model: openai/your-model-name
instruction: You are a helpful coding assistant
provider:
base_url: https://your-provider.example.com/v1
By default, Docker Agent uses the OPENAI_API_KEY environment variable for
authentication. If your provider uses a different variable, specify it with
token_key:
agents:
root:
model: openai/your-model-name
instruction: You are a helpful coding assistant
provider:
base_url: https://your-provider.example.com/v1
token_key: YOUR_PROVIDER_API_KEY