> ## Documentation Index
> Fetch the complete documentation index at: https://docs.multimind.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart: MultiMind in 5 Minutes

Install, make your first model call, guard it against PII leaks, track what it costs, and scan text for sensitive data from the command line. Every snippet below is copy-paste runnable.

Not a developer? Read the [plain-language getting started guide](/getting-started-non-technical) instead.

## 1. Install (30 seconds)

```bash theme={null}
pip install multimind-sdk
```

That is the whole core install: multi-provider models, the PII guard, cost tracking, hallucination checks, and the CLI. Extras like `[rag]` or `[gateway]` are only needed for those features — see the [installation guide](/installation).

## 2. Pick a model path

**Path A — cloud provider (needs one API key).** Set the key for whichever provider you have:

```bash theme={null}
export OPENAI_API_KEY=sk-...      # or GROQ_API_KEY, ANTHROPIC_API_KEY,
                                  # GEMINI_API_KEY, MISTRAL_API_KEY, DEEPSEEK_API_KEY
```

**Path B — fully local, no API key.** Install [Ollama](https://ollama.com/download), then:

```bash theme={null}
ollama pull mistral
```

MultiMind talks to Ollama over HTTP; no extra Python packages needed.

To see which providers are configured at any time (works offline):

```bash theme={null}
multimind models list
```

## 3. First generation

Path A (cloud):

```python theme={null}
import asyncio
from multimind import OpenAIModel

async def main():
    model = OpenAIModel(model_name="gpt-4o-mini")
    print(await model.generate("Explain quantum computing in one paragraph"))

asyncio.run(main())
```

Path B (local, no key):

```python theme={null}
import asyncio
from multimind import OllamaModel

async def main():
    model = OllamaModel(model_name="mistral")
    print(await model.generate("Explain quantum computing in one paragraph"))

asyncio.run(main())
```

The interface is identical for every provider — `ClaudeModel`, `GeminiModel`, `GroqModel`, `MistralAIModel`, `DeepSeekModel` all work the same way. Prefer plain functions over `asyncio`? Use `model.generate_sync(...)` — see the [cookbook](/cookbook#sync-usage-no-asyncio).

## 4. Guard it against PII leaks

Wrap any model so emails, SSNs, credit cards, API keys, and other PII are redacted before they ever reach the provider — with an audit trail:

```python theme={null}
import asyncio
from multimind import OpenAIModel
from multimind.compliance import guard

async def main():
    model = guard(
        OpenAIModel(model_name="gpt-4o-mini"),   # or OllamaModel(model_name="mistral")
        strategy="mask",                          # emails become [EMAIL], SSNs [SSN], ...
        block_on=("credit_card", "ssn"),          # refuse these outright
        audit_log="compliance_audit.jsonl",       # types & counts only — never raw PII
    )
    print(await model.generate("Email jane.doe@corp.com about the invoice"))
    # The provider only ever saw: "Email [EMAIL] about the invoice"

asyncio.run(main())
```

Then look at `compliance_audit.jsonl` — one JSON line per event, recording what was detected and redacted (types, counts, and hashes only; never the raw values).

## 5. Track what it costs

```python theme={null}
import asyncio
from multimind import OpenAIModel
from multimind.observability import CostTracker, track_costs

async def main():
    tracker = CostTracker()   # add jsonl_path="costs.jsonl" to persist records
    model = track_costs(OpenAIModel(model_name="gpt-4o-mini"), tracker=tracker)

    await model.generate("Say hello in five languages")
    print(tracker.report())   # tokens and dollars, per model and total

asyncio.run(main())
```

Want a hard spending ceiling instead of just a report? Add `budget=Budget(max_cost=1.00)` — calls past the ceiling are blocked before dispatch. Recipe: [budget-capped calls](/cookbook#budget-capped-calls).

## 6. Scan for PII from the command line

No Python needed — one command, works completely offline:

```bash theme={null}
multimind compliance scan-text "My email is jane.doe@corp.com and my card is 4111 1111 1111 1111"
```

Output is a table of findings (type, position, matched text) and the command exits with code 1 if any PII was found, so it drops straight into CI pipelines. Scan a file instead, and print a redacted version:

```bash theme={null}
multimind compliance scan-text --file customer_notes.txt --redact mask
```

## Where to next

* [Cookbook](/cookbook) — short task-oriented recipes: switch providers, structured output with Pydantic, hallucination detection, the gateway API, and more
* [Compliance guide](/compliance) — the full GDPR/HIPAA compliance module
* [Deployment guide](/deployment) — `docker pull ghcr.io/multimindlab/multimind-sdk:latest`, docker compose, and a fully local stack
* [Docs index](/index) — everything else


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.