Skip to main content
A model provider is one place Monad can send an inference request. Monad ships 24 built-in provider types — 8 with a dedicated SDK and 16 presets over the bundled OpenAI-compatible adapter — and any provider can also arrive as an Atom Pack. How to connect Monad to a model provider: pick a provider, add a credential, choose a default model. This is the user-facing companion to model-providers.md, which explains the provider catalog, the two provider strategies, and why the long tail of OpenAI-compatible providers needs no extra packages.

What you need

  • A provider account and an API key (a few providers, like a local Ollama server, work without one).
  • For self-hosted or account-scoped providers (Azure OpenAI, Ollama, and similar), the base URL of your endpoint.
The full list of built-in providers comes from the provider catalog — see the internals doc for how it is defined. Every setup surface below reads the same catalog from the daemon, so they always offer the same providers.

Three ways to set up

1. Guided terminal setup

The interactive wizard lists the provider catalog, prompts for the base URL when the provider needs one, prompts for any provider-specific fields (for example the AWS region for Amazon Bedrock), asks for the API key, tests the connection before saving anything, and then lets you pick a default model from the provider’s model list. If the test fails you can retry with a different key or go back and pick another provider. monad init --no-input (or -y) seeds the home directory without prompting, for scripted setups.

2. Explicit CLI commands

The CLI splits the surface into three nouns: provider, credential, and model. All of them accept the global --json flag for machine-readable output. Add or update a provider (the JSON shape is id, label, type, optional baseUrl and extra):
Attach a credential to a provider:
Probe a provider and key without saving either:
On success the daemon returns the provider’s model catalog, so this doubles as a model discovery command.

3. Web UI

Run monad on a fresh install and the browser opens the same setup flow. Afterwards, Studio → Models and providers (/studio/models) adds providers, manages each provider’s credentials, browses its models, and edits model profiles. See the web UI.

Model profiles and the default model

A model profile is a named recipe that maps roles to concrete models: chat is the required default route, and optional routes cover fast, vision, image, video, speech, transcription, embedding, and memory. A profile can also carry generation params and fallback targets. The fixed default profile is used whenever a request does not name one.
The web UI edits the same profiles under Studio → Models and providers.

Where things are stored

  • Providers, their credentials, and profiles live in agents.json under Monad’s config directory. Provider credentials are native settings and do not use Agent Runtime Credentials or ${secret:...} references.
  • Secrets never come back out either. monad credential list shows only a masked token preview, and monad credential add echoes just the new credential id.
  • The user is responsible for protecting the native settings file. The daemon and settings APIs continue to redact secrets from responses and logs.

Provider-specific notes

  • Azure OpenAI requires a base URL for your resource (https://{resource}.openai.azure.com/openai/v1), and the model id is your Azure deployment name.
  • Amazon Bedrock requires an AWS region (prompted as an extra field) and a bearer API key (ABSK…).
  • Neither Azure nor Bedrock exposes a standard model-listing route, so when the connection test returns no models, the wizard falls back to manual model-id entry — type the model or deployment id yourself.
  • Ollama and similar local servers treat the API key as optional; just point the base URL at your server.
Details and rationale for all of the above are in the internals doc.

Custom providers

A provider that is not in the catalog can still be added as a third-party atom pack: drop a module that exports a ModelProvider into ~/.monad/atoms/providers/ and the daemon picks it up without a restart. See model-providers.md for the contract.

For contributors

When developing Monad itself, copy .env.example to .env.local and set OPENROUTER_API_KEY; the dev environment seeds it as a working credential so live runs work out of the box. This is a dev-only path — release builds configure providers only through the flows above. See CONTRIBUTING.md.