Setting Up AI Models
Connect AI providers and configure the models your team uses.
Portablemind's AI features — the AI Assistant, AI agents, memory, and document analysis — are powered by Large Language Models (LLMs). Before anyone in your workspace can use them, you connect at least one AI provider and configure a model.
Portablemind supports models from Anthropic (Claude), OpenAI (GPT), Google (Gemini), and xAI (Grok), as well as local models served through Ollama. You bring your own provider API key, so you stay in control of billing and usage. This page walks through obtaining a key from each provider and configuring models in Portablemind.
Choose your provider
Which provider you start with depends on your priorities:
| Provider | Models | Good to know |
|---|---|---|
| Anthropic | Claude family | Strong reasoning and long-context work; pay-as-you-go credits |
| OpenAI | GPT and o-series | Broad general-purpose lineup; pay-as-you-go pricing per model |
| Gemini family | Very large context windows; free tier with generous limits | |
| xAI | Grok family | Strong reasoning with a real-time information focus; monthly free credits |
| Ollama | Llama, Mistral, Qwen, and other open models | Runs on your own hardware — private, offline-capable, no API key |
You can configure models from multiple providers side by side and choose between them per conversation or per agent.
Get a provider API key
The steps below happen on each provider's own website, not in Portablemind. Once you have a key, jump to Configure a model.
Warning: Treat API keys like passwords. Most providers show the full key only once at creation — copy it somewhere safe, never share it publicly, and never commit it to version control.
Anthropic (Claude)
- Go to console.anthropic.com and sign up for an account if you don't have one.
- Navigate to the API Keys section and click "Create Key". Give it a descriptive name (e.g., "Portablemind Integration") and copy the generated key — it starts with
sk-ant-. - Add credits to your Anthropic account. Even a small amount ($5–10) provides substantial usage for getting started.
OpenAI (GPT)
- Go to platform.openai.com and sign up or log in.
- In the API Keys section of your account settings, click "Create new secret key", name it (e.g., "Portablemind Integration"), and copy the key — it starts with
sk-. You won't be able to see it again. - Add credits to your account. OpenAI uses pay-as-you-go pricing with different rates for each model.
Google (Gemini)
- Go to Google AI Studio and sign in with your Google account.
- Click "Create API Key", select a project (or create a new one), and copy the generated key.
- Make sure the Generative Language API is enabled for your project in the Google Cloud Console.
Note: The Gemini API has a free tier with generous limits for development and testing.
xAI (Grok)
- Go to console.x.ai and sign up or log in.
- Open the API Keys section, click "Create API key", name it, and copy the key — it starts with
xai-. The full key isn't viewable again after creation. - xAI provides $25 in free credits every month, which is generous for development and testing. You can add more through the billing section if needed.
Ollama (local models)
Ollama runs open models on your own hardware, giving you privacy and offline capability with no API key required.
- Download and install Ollama from ollama.ai for your operating system:
# macOS/Linux
curl -fsSL https://ollama.ai/install.sh | sh
# Windows — download the installer from ollama.ai
- Pull the models you want to use:
ollama pull llama3.2:3b
ollama pull mistral
ollama pull qwen2.5:7b
- Ollama runs as a local API server on port 11434 and starts automatically after installation. Verify it's running with
ollama list.
Tip: Start with smaller models (1–4 GB) if you have limited RAM. Larger mixture-of-experts models can require 26 GB or more.
Configure a model in Portablemind
Model configuration lives in AI Studio, Portablemind's home for AI model, agent, and prompt configuration — specifically the LLM Models section, under Models & Tools in AI Studio's navigation panel. Creating a model (the New Model button) connects your provider key to a specific model so it can be used across the platform.
When you create a model, you:
- Select a provider, then choose from that provider's pre-configured model types. Each model type comes with its specifications — description, context window, and pricing — already filled in, so you don't need to look them up. Providers typically offer a range of tiers: flagship models for the hardest work (Claude Opus, GPT-4-class, Gemini Pro, the latest Grok), balanced mid-tier models, and fast, inexpensive models for high-volume tasks (Claude Haiku, GPT mini variants, Gemini Flash).
- Enter your API key for that provider. For Ollama there's no key — instead you enter the host and port of your Ollama server (e.g.,
localhostand11434for a local install). - Name the model and set the internal identifier. The friendly name is what people see; the internal identifier is what you'll use when referencing this model elsewhere in the platform (for example, in agent configuration or settings that ask for a model name). It's auto-generated from the name if you leave it blank, or you can customize it.
- Save. The model is available immediately throughout Portablemind, with consistent pricing, context window, and capability information carried over from the model type you selected.
Note: Model configuration is workspace-wide — once a model is created it powers AI features for your whole workspace, and its usage is billed to the provider key you supplied. Portablemind tracks per-message token usage and cost for every configured model, so you can see exactly what your AI spend looks like.
Who can manage AI configuration
AI Studio is a protected area: access is controlled by Portablemind's capability-based security system, so only users whose security roles grant AI Studio access can add providers, manage API keys, or change model configuration. In practice this is typically your workspace administrators, via AI Studio and the Administration area.
A few practices worth adopting:
- Limit AI configuration access to the people who genuinely need it — the same principle of least privilege that applies to agent permissions.
- If you suspect a provider key has been exposed, rotate it in the provider's console and update the model configuration with the new key.
- Keep an eye on your provider billing dashboards alongside Portablemind's built-in cost tracking.
Test your setup
Once a model is configured, the quickest test is a conversation: open the AI Assistant and send a message. If you've configured multiple models, you can pick which one to chat with.
With a working model you can now:
- Chat with AI assistants that understand your business context and data — see AI Assistant.
- Upload and analyze documents in your conversations — see Files.
- Build autonomous agents that work on your behalf, on demand or on a schedule — see Building AI Agents.
- Give your AI persistent, long-term memory across sessions — see Memory.
- Extend what your AI can do with reusable skills — see Skills.
Developers can also connect external tools such as Claude Code to a Portablemind workspace via the Model Context Protocol (MCP) — see Developers and Coding Agents. For API-level details, see the API guide.