Skip to main content

1. Subscribe to M Plan

Go to Plan Details, choose a tier, and complete payment.
If you only use M Plan in MiniMax Code, sign in to MiniMax Code after completing step 1. You do not need to configure an M Plan API key.

2. Get your M Plan API key

After subscribing, find your M Plan API key in Plan Details. You need this M Plan API key to use M Plan in AI tools such as Claude Code and Cursor. Note:
  • Your M Plan API key only uses your M Plan usage and is not interchangeable with a pay-as-you-go API Key.
  • Keep your M Plan API key secure. Do not share it with others or commit it to a code repository. Use an environment variable or configuration file to store it.

3. Test an API call (optional)

For example, use the Anthropic SDK to quickly test MiniMax-M3.1-Flash. Install the SDK
Configure environment variables Replace ${YOUR_API_KEY} with your M Plan API key:
See Configure environment variables. Call the API
Python