# MiniMax Code

> Add FreshRouter to MiniMax Code's settings and use MiniMax M4 or any other model.

MiniMax Code is MiniMax's coding agent, an app for macOS and Windows. FreshRouter goes into its settings as your own provider. Then MiniMax M4, and any other model on your Models page, runs on your FreshRouter balance.

## Add FreshRouter in the app

1. Open the settings: on a Mac, **MiniMax Code → Settings** in the menu bar.
2. Go to **Usage & model → Custom model**. Typing `custom` into the settings search finds it too.
3. Click **+ Add provider**. In **Provider**, pick **Others** (type `Other` if the list doesn't show it).
4. Fill in the provider and the model with the values below, and click **Save**.
5. Pick **MiniMax-M4** in the model menu next to the message box.

The provider:

| Field | Value |
| --- | --- |
| API format | `OpenAI Completions` |
| Base URL | `https://freshrouter.com/v1` |
| API key | Your FreshRouter key |

The model, under **Model 01**:

| Field | Value |
| --- | --- |
| Model name | `MiniMax-M4` |
| Context window | `1000000` |
| Max tokens | `64000` |
| Supported attachments | Images |

> Leave Custom headers and Effort empty.

## More models

Click **+ Add** under the model for another one. Any ID from your Models page works, such as `gemini-4-neon` or `gpt-6.1-sol`. Each model's context window and output limit are in the model catalog, `/models.json` on this site.

## Claude models

Claude models are cached only in Anthropic's format, which makes long sessions much cheaper. For them, add FreshRouter a second time with **API format** set to **Anthropic Messages**, the same address, `https://freshrouter.com/v1`, and the same key. More on the **Prompt caching** page.
