What is a MiniMax API Key?
A MiniMax API key is a unique authentication token that grants access to the full suite of AI services from MiniMax (also known as Hailuo AI). These services include powerful models for text generation, speech synthesis, video creation, image generation, and music composition.
Your key serves as your identity when making requests to any endpoint. It's required for every call and determines your usage quota and billing.
How to Get Your MiniMax API Key
Option 1: Our Proxy Service (Recommended - 40% of Official Price)
- Leave your email on our website
- We'll contact you within 72 hours
- Get your API key at 40% of official pricing
- Start using all MiniMax APIs immediately
Option 2: Official MiniMax Platform
- Register an account on the MiniMax open platform
- Complete identity verification
- Navigate to API Key management
- Generate a new API key
How to Use Your Key
All requests require authentication via a Bearer token in the HTTP header. Here's how to use your key in code:
Python Example
import requests
API_KEY = "your_minimax_api_key"
url = "https://api.minimax.chat/v1/text/chatcompletion_v2"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
data = {
"model": "abab6.5s-chat",
"messages": [
{"role": "user", "content": "Hello, MiniMax!"}
]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())JavaScript Example
const API_KEY = "your_minimax_api_key";
const response = await fetch(
"https://api.minimax.chat/v1/text/chatcompletion_v2",
{
method: "POST",
headers: {
"Authorization": `Bearer ${API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "abab6.5s-chat",
messages: [
{ role: "user", content: "Hello, MiniMax!" }
],
}),
}
);
const data = await response.json();
console.log(data);cURL Example
curl -X POST "https://api.minimax.chat/v1/text/chatcompletion_v2" \
-H "Authorization: Bearer your_minimax_api_key" \
-H "Content-Type: application/json" \
-d '{
"model": "abab6.5s-chat",
"messages": [{"role": "user", "content": "Hello!"}]
}'Security Best Practices
- 1.Never expose your key in client-side code - Always keep it on the server side.
- 2.Use environment variables - Store credentials in
.envfiles, never hardcode them. - 3.Rotate keys regularly - Generate new credentials periodically for better security.
- 4.Monitor usage - Keep track of your API usage to detect any unauthorized access.
What You Can Do with Your Key
A single key unlocks access to all available AI services:
Chat Completions
Text generation with multi-turn conversation support
Speech Synthesis
High-quality text-to-speech with multiple voices
Video Generation
Hailuo Video - text/image to video
Image Generation
Text-to-image and image-to-image generation
Music Generation
AI music composition from text descriptions
Voice Clone
Clone any voice for speech synthesis
Pricing
Through our proxy service, your key costs only 40% of the official price. You get the exact same functionality, same endpoints, and same performance - just at a fraction of the cost.
Frequently Asked Questions
How do I get a MiniMax API Key?
You can get a MiniMax API key by registering on the official MiniMax platform, or use our proxy service to get an API key at 40% of the official price with full API compatibility.
Is the MiniMax API Key free?
MiniMax offers limited free credits for new users. For production use, you need a paid plan. Our proxy service offers the most affordable pricing at 40% of official rates.
How do I use the key in my code?
Include it in the Authorization header as a Bearer token: "Authorization: Bearer YOUR_API_KEY". This works with all endpoints including chat, speech, video, and image generation.
Can I use the same key for all services?
Yes, a single key gives you access to all available services including text generation (Chat Completions), speech synthesis, video generation, image generation, and music generation.
What is the difference between official and proxy keys?
Our proxy keys are fully compatible with the official platform. The only difference is pricing - our keys cost 40% of the official price while providing identical functionality and performance.