Skip to main content

MiniMax Code CLI

Before you start

You need a Divyam account and an API key. If you don't have them yet, follow Getting Started first.

Replace the shortened divyam-sw-v1-... shown in examples with your complete API key.

The examples use divyam-as/gpt-6-sol. For another model, select its current ID in your harness or copy it from Models and pricing, and check its context limit and supported features.

1. Install MiniMax Code CLI​

Follow the official installation instructions.

Set your key in the shell you will use to start MiniMax Code:

export MCODE_PROVIDER_API_KEY="divyam-sw-v1-..."

2. Connect Divyam and choose a model​

divyam-as/

Model ID: divyam-as/gpt-6-sol. Context window: 1,050,000 tokens. Models and pricing

Add Divyam with MiniMax's custom-provider command:

mcode provider add \
--name Divyam \
--base-url https://api.preview.divyam.ai/v1 \
--api-format openai-completions \
--model divyam-as/gpt-6-sol

Replace the shortened key with your complete key before running the command. For an image-capable model, include --support-image when adding the provider.

Open ~/.minimax/config.yaml and add or update this root-level setting:

defaultModel: custom_provider:divyam/divyam-as/gpt-6-sol

Use the provider ID from the file's custom_provider section. Replace divyam in this setting if that ID differs.

3. Send your first prompt​

From your project folder, run:

mcode
In MiniMax Code CLI's composer
Hello, what are your capabilities?
Paste this message, then send it.

Review proposed changes and tool approvals in the terminal.

Check your requests​

Open the Divyam console and select Logs. Your requests appear there within a few seconds, newest first, with their status, token counts and latency. Usage and Credits & Billing catch up within a few minutes.

Local cost estimates

Some clients display zero when model prices are missing. Check Credits & Billing for Divyam charges. Local dollar limits depend on the client's price and usage data.

For filters, cached-token counts and the requested-versus-routed view, see Logs and usage.