Files
promptfoo--promptfoo/site/docs/providers/minimax.md
T
wehub-resource-sync 0d3cb498a3
CI / Shell Format Check (push) Has been cancelled
CI / Check Ruby (3.4) (push) Has been cancelled
CI / CI Config (push) Has been cancelled
CI / Test on Node ${{ matrix.node }} and ${{ matrix.os }}${{ matrix.shard && format(' (shard {0}/3)', matrix.shard) || '' }} (push) Has been cancelled
CI / Build on Node ${{ matrix.node }} (push) Has been cancelled
CI / Style Check (push) Has been cancelled
CI / Generate Assets (push) Has been cancelled
CI / Check Python (3.14) (push) Has been cancelled
CI / Check Python (3.9) (push) Has been cancelled
CI / Build Docs (push) Has been cancelled
CI / Code Scan Action (push) Has been cancelled
CI / Site tests (push) Has been cancelled
CI / webui tests (push) Has been cancelled
CI / Run Integration Tests (push) Has been cancelled
CI / Run Smoke Tests (push) Has been cancelled
CI / Go Tests (push) Has been cancelled
CI / Share Test (push) Has been cancelled
CI / Redteam (Production API) (push) Has been cancelled
CI / Redteam (Staging API) (push) Has been cancelled
CI / GitHub Actions Lint (push) Has been cancelled
CI / Check Ruby (3.0) (push) Has been cancelled
release-please / release-please (push) Has been cancelled
release-please / build (push) Has been cancelled
release-please / publish-npm (push) Has been cancelled
release-please / publish-npm-backfill (push) Has been cancelled
release-please / docker (push) Has been cancelled
release-please / publish-code-scan-action (push) Has been cancelled
release-please / attest-code-scan-action (push) Has been cancelled
Deploy local.promptfoo.app / Deploy to Cloudflare Pages (push) Has been cancelled
Test and Publish Multi-arch Docker Image / test (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-amd64 platform:linux/amd64 runner:ubuntu-latest]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / build-docker-and-push-digests (map[digest-suffix:linux-arm64 platform:linux/arm64 runner:ubuntu-24.04-arm]) (push) Has been cancelled
Test and Publish Multi-arch Docker Image / merge-docker-digests (push) Has been cancelled
Test and Publish Multi-arch Docker Image / Attest Multi-arch Image (push) Has been cancelled
Validate Renovate Config / Validate Renovate Configuration (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:24:08 +08:00

3.0 KiB

title, sidebar_label, sidebar_position, description
title sidebar_label sidebar_position description
MiniMax Provider MiniMax 50 Configure MiniMax's OpenAI-compatible API with the flagship M3 model and prior M2.7 routes, featuring large context windows and prompt caching for LLM testing.

MiniMax

MiniMax provides an OpenAI-compatible API for their language models. The MiniMax provider follows the OpenAI provider chat configuration pattern, with the MiniMax-specific parameter differences described below.

Setup

  1. Get an API key from the MiniMax Platform
  2. Set MINIMAX_API_KEY environment variable or specify apiKey in your config

Configuration

Basic configuration example:

providers:
  - id: minimax:MiniMax-M3
    config:
      temperature: 0.7
      max_completion_tokens: 2048
      apiKey: YOUR_MINIMAX_API_KEY

  - id: minimax:MiniMax-M2.7
    config:
      max_completion_tokens: 2048

Configuration Options

  • temperature - Range (0.0, 1.0], cannot be 0
  • max_completion_tokens - Maximum completion tokens; the OpenAI-compatible API currently allows up to 2048. Legacy max_tokens config is translated to this field for compatibility.
  • apiBaseUrl - Optional custom MiniMax-compatible proxy endpoint
  • top_p
  • tools and tool_choice - Use these for tool calling. MiniMax rejects the deprecated function_call parameter.

When MiniMax reports prompt-cache reads, promptfoo calculates cost using the returned cached token count and the model's cache-read rate.

Available Models

MiniMax-M3 (Default)

  • Latest flagship model with up to a 1M token context window (512K guaranteed minimum) and up to 128K output
  • Multimodal: supports text, image, and video input
  • Input: $0.12/1M (cache hit), $0.6/1M (cache miss)
  • Output: $2.4/1M

:::note

M3 is the default and costs roughly 2x M2.7 per token. For cost-sensitive workloads, pin minimax:MiniMax-M2.7 (or MiniMax-M2.7-highspeed) explicitly.

:::

MiniMax-M2.7

  • Previous-generation flagship model
  • 204,800 token context window
  • Input: $0.06/1M (cache hit), $0.3/1M (cache miss)
  • Output: $1.2/1M

MiniMax-M2.7-highspeed

  • High-speed version of M2.7 for low-latency scenarios
  • 204,800 token context window
  • Input: $0.06/1M (cache hit), $0.6/1M (cache miss)
  • Output: $2.4/1M

Example Usage

Here's an example comparing MiniMax with OpenAI:

providers:
  - id: minimax:MiniMax-M3
    config:
      temperature: 0.7
      max_completion_tokens: 2048
  - id: openai:gpt-4o
    config:
      temperature: 0.7
      max_tokens: 4000

prompts:
  - 'Answer the following question: {{question}}'

tests:
  - vars:
      question: 'What is the capital of France?'
    assert:
      - type: contains
        value: 'Paris'

API Documentation