Skip to main content

Model Overview

M2-her is MiniMax’s LLM optimized for dialogue scenarios, supporting rich role settings and conversation history management capabilities.

Supported Models

M2-her Core Features

M2-her supports multiple role type configurations, including model roles (system), user roles (user_system), conversation groups (group), etc., allowing you to flexibly build complex dialogue scenarios.
Through sample_message_user and sample_message_ai, you can provide example dialogues to help the model better understand the expected conversation style and response patterns.
The model supports complete conversation history management and can conduct coherent multi-turn conversations based on previous content, providing a more natural interactive experience.

Usage Example

1

Install SDK

2

Set Environment Variables

3

Call M2-her


Role Type Description

M2-her supports the following message role types:

Basic Roles

Advanced Roles


Usage Scenario Examples

Scenario 1: Basic Conversation

Scenario 2: Role-Playing Conversation

Scenario 3: Example Learning Conversation


Parameter Description

Core Parameters


Best Practices

Use system to define AI’s basic behavior and user_system to define user identity, making conversations more natural and scenario-appropriate.
Provide 1-3 example conversations through sample_message_user and sample_message_ai to effectively guide the model’s response style.
Keep complete conversation history (including user and assistant messages) for the model to provide coherent responses based on context.
Set appropriate max_completion_tokens according to scenario needs to avoid responses being too long or truncated.

FAQ

Include complete conversation history in each request, arranging user and assistant messages in chronological order.
system defines AI’s role, while user_system defines the user’s role. In role-playing scenarios, using both together creates richer conversation experiences.
Yes, all messages (including example messages) count toward input tokens. It’s recommended to provide 1-3 concise examples.
M2-her currently only supports text input and does not support mixed text-image input.

API Reference

View complete API documentation

Pricing

Learn about M2-her pricing details

Error Codes

View API error code descriptions

Quick Start

Get started with MiniMax API quickly