DEV Community

xsw
xsw

Posted on

How to use MiniMax-M3 in Claude Code and opencode through an API gateway

How to use MiniMax-M3 in Claude Code and opencode through an API gateway

MiniMax has become an interesting model family for developers who want to test alternatives in coding workflows. The hard part is often not the model itself, but the integration layer: many developer tools already know how to talk to OpenAI-compatible or Anthropic-compatible APIs, while each model provider may expose a slightly different interface.

Model Gateway is a small third-party gateway that exposes MiniMax models through familiar API formats. The goal is simple: make it easier to try MiniMax-M3 and related models in tools like Claude Code, opencode, and other OpenAI-compatible clients.

Website: https://www.model-gateway.com/

What this is useful for

This setup is useful if you want to:

  • Try MiniMax-M3 in a coding assistant workflow.
  • Use MiniMax models in tools that support OpenAI-compatible endpoints.
  • Use an Anthropic-compatible endpoint for Claude Code-style workflows.
  • Test model behavior without writing a custom provider adapter.

This is a third-party gateway, not an official MiniMax service. For sensitive production workloads, review the service terms, data handling policy, and security posture before sending private code or confidential data.

Supported workflow

Model Gateway documents two main endpoint styles:

  • OpenAI-compatible endpoint: https://www.model-gateway.com/v1
  • Anthropic-compatible endpoint: https://www.model-gateway.com/anthropic

The landing page lists MiniMax models such as:

  • MiniMax-M3
  • MiniMax-M2.7
  • MiniMax-M2.7-highspeed
  • MiniMax-M2.5
  • MiniMax-M2.5-highspeed

Claude Code setup

If your tool supports Anthropic-style environment variables, the setup is typically:

$env:ANTHROPIC_BASE_URL="https://www.model-gateway.com/anthropic"
$env:ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
$env:ANTHROPIC_MODEL="MiniMax-M3"
Enter fullscreen mode Exit fullscreen mode

For macOS or Linux shells:

export ANTHROPIC_BASE_URL="https://www.model-gateway.com/anthropic"
export ANTHROPIC_AUTH_TOKEN="YOUR_API_KEY"
export ANTHROPIC_MODEL="MiniMax-M3"
Enter fullscreen mode Exit fullscreen mode

Then start your coding tool in the same terminal session so it can read those environment variables.

opencode setup

For opencode or tools using OpenAI-compatible provider settings, use the OpenAI-compatible endpoint:

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "model-gateway": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "Model Gateway",
      "options": {
        "baseURL": "https://www.model-gateway.com/v1",
        "apiKey": "YOUR_API_KEY"
      },
      "models": {
        "MiniMax-M3": {
          "name": "MiniMax-M3"
        }
      }
    }
  },
  "model": "model-gateway/MiniMax-M3"
}
Enter fullscreen mode Exit fullscreen mode

Adjust the model name if you want to test another listed MiniMax model.

Why use a gateway?

The practical benefit is compatibility. If your tool already supports OpenAI-style or Anthropic-style requests, a gateway can reduce the amount of adapter code you need to write.

This is especially helpful for evaluation. You can test a model in a real workflow, compare behavior, and decide whether it is worth integrating more deeply.

Things to check before serious use

Before using any third-party API gateway heavily, check:

  • Does the service use HTTPS for all API traffic?
  • Is there a privacy policy or data handling explanation?
  • Are fair-use limits documented?
  • Is there a refund policy?
  • What support channel is available if a model or endpoint fails?
  • Are you comfortable sending the code or prompts involved in your workflow?

For Model Gateway specifically, HTTPS is available at https://www.model-gateway.com/. Use HTTPS in your local configuration.

Best first test

A simple first test is to run the model on a small non-sensitive repository and ask it to:

  • explain one function,
  • write a small unit test,
  • refactor a short file,
  • compare two implementation approaches.

This gives you a realistic feel for latency, instruction-following, code quality, and compatibility without exposing sensitive material.

Final thoughts

Model Gateway is best understood as a lightweight compatibility bridge for MiniMax model experiments. Its clearest use case is developer tooling: Claude Code, opencode, OpenAI-compatible clients, and coding workflows where trying another model should take minutes instead of custom integration work.

If you try it, the most useful feedback is practical: which tool you used, which model you selected, whether the endpoint behaved as expected, and what documentation would have made setup faster.

Website: https://www.model-gateway.com/

Top comments (0)