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

# Pi

> Use open models on Muna in the Pi coding agent.

[Pi](https://pi.dev) connects to OpenAI-compatible endpoints through its `models.json` file.

## Configuring Pi

Add Muna to `~/.pi/agent/models.json`:

```json theme={null}
{
  "providers": {
    "muna": {
      "baseUrl": "https://inference.muna.ai/v1",
      "api": "openai-completions",
      "apiKey": "$MUNA_API_KEY",
      "models": [
        { "id": "@qwen/qwen-3.8-27b" },
        { "id": "@google/gemma-4-26b-a4b-it" }
      ]
    }
  }
}
```

`$MUNA_API_KEY` is read from your environment when Pi sends a request.

Start Pi in your project directory, then pick a Muna model with `/model`:

```bash theme={null}
pi
```

Press `Ctrl+S` in the model picker to make it the default for new sessions.

<Tip>
  Add any chat model from [Models](/inference/models) to `models`, using the Muna model
  tag as the `id`.
</Tip>


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