MiniMax M2 API — Access MiniMax M2 on Gonka
Gonka Broker

MiniMax M2 on Gonka

An efficient, lower-cost model for coding and agents.

MiniMax

What is MiniMax M2?

MiniMax M2 is MiniMax's open-source model aimed at coding and agentic workloads with an emphasis on efficiency. On Gonka you run the MiniMax-M2.7 release.

It supports a 200K-token context and a larger 16,384-token maximum output, which suits workloads that generate long responses, all through the same API.

What MiniMax M2 is best for

Coding

Code generation and editing across common languages.

Agentic and tool use

Built with agent workflows and tool calling in mind.

Cost-sensitive workloads

An efficient option for high-volume or budget-conscious usage.

Long outputs

Up to 16,384 tokens per response, handy for long generations and structured documents.

Key specs

Context window
200K tokens
Max output
16K tokens
Quantization
FP8
Modalities
Text in · text out
Features
Tool calling
Model ID
MiniMaxAI/MiniMax-M2.7

Pricing in USD

$0.30 / 1M tokens, input and output

The same price for your prompt and the model's reply. Your USD rate is locked in when you top up, and it won't change until you've used the balance. No crypto, wallets, or tokens.

Or try MiniMax M2 free: the monthly free tier covers about 1.1M tokens of this model. No card required.

See full Gonka API pricing

How to use the MiniMax M2 API

The MiniMax M2 API on Gonka works with both OpenAI and Anthropic clients. Point any OpenAI client at https://proxy.gonkabroker.com/v1, use your gnk-prx- key, and set the model to MiniMaxAI/MiniMax-M2.7.

from openai import OpenAI

client = OpenAI(
    base_url="https://proxy.gonkabroker.com/v1",
    api_key="gnk-prx-YOUR_KEY_HERE",
)

resp = client.chat.completions.create(
    model="MiniMaxAI/MiniMax-M2.7",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)

Using the Anthropic SDK? See the Anthropic-compatible setup.

How to create a Gonka API key

Use MiniMax M2 in Claude Code

MiniMax M2 is verified as an engine for a Claude Code agent: the full tool-use loop, streaming, and multi-turn sessions work through our Anthropic-compatible API. Export three variables and start your agent as usual.

export ANTHROPIC_BASE_URL="https://proxy.gonkabroker.com"
export ANTHROPIC_AUTH_TOKEN="gnk-prx-YOUR_KEY_HERE"
export ANTHROPIC_MODEL="MiniMaxAI/MiniMax-M2.7"

claude
Running Claude Code on open models

Run MiniMax M2 on Gonka

Sign up, add a card, and call open-source models through a simple API in minutes.

Get started

Already have an account? Sign in