"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.minimaxDocs = void 0;
exports.minimaxDocs = [
{
id: "minimax-chat",
title: "MiniMax Chat API",
category: "chat",
provider: "minimax",
keywords: ["minimax", "chat", "completions", "abab", "chat completion"],
content: `# MiniMax Chat API
## Endpoint
POST https://api.minimax.chat/v1/text/chatcompletion_v2
## Headers
- Authorization: Bearer YOUR_API_KEY
- Content-Type: application/json
## Request Body
\`\`\`json
{
"model": "MiniMax-M1" | "MiniMax-Text-01" | "abab6.5" | "abab6.5s" | "abab6.5g" | "abab5.5s",
"messages": [
{
"role": "system" | "user" | "assistant" | "tool",
"content": "string" | [
{"type": "text", "text": "string"},
{"type": "image", "image_url": "string (url or base64)"},
{"type": "file", "file_url": "string"}
],
"name": "string (optional, for named speakers)"
}
],
"max_tokens": number,
"temperature": number (0-1, default 0.9),
"top_p": number (0-1, default 0.95),
"stream": boolean,
"tools": [
{
"type": "function",
"function": {
"name": "string",
"description": "string",
"parameters": {JSON Schema}
}
}
],
"tool_choice": "auto" | "none" | {"type": "function", "function": {"name": "string"}},
"bot_setting": [
{
"bot_name": "string",
"content": "string (personality)"
}
]
}
\`\`\`
## Response
\`\`\`json
{
"id": "xxx",
"model": "MiniMax-M1",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "string",
"tool_calls": [
{
"id": "xxx",
"type": "function",
"function": {"name": "string", "arguments": "JSON string"}
}
]
},
"finish_reason": "stop" | "length" | "tool_calls"
}
],
"usage": {
"total_tokens": 0,
"prompt_tokens": 0,
"completion_tokens": 0
}
}
\`\`\`
## Available Models
- MiniMax-M1: Latest flagship model, strong reasoning
- MiniMax-Text-01: Optimized for text tasks
- abab6.5: Previous generation, balanced
- abab6.5s: Smaller, faster variant
- abab6.5g: Optimized for generation
- abab5.5s: Legacy model
## Python Example
\`\`\`python
import requests
url = "https://api.minimax.chat/v1/text/chatcompletion_v2"
headers = {
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
}
payload = {
"model": "MiniMax-M1",
"messages": [
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": "Hello!"}
],
"max_tokens": 1024,
"temperature": 0.7
}
response = requests.post(url, headers=headers, json=payload)
result = response.json()
print(result["choices"][0]["message"]["content"])
\`\`\`
## Node.js Example
\`\`\`javascript
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: "MiniMax-M1",
messages: [
{ role: "system", content: "You are helpful" },
{ role: "user", content: "Hello!" }
],
max_tokens: 1024,
temperature: 0.7
})
});
const data = await response.json();
console.log(data.choices[0].message.content);
\`\`\`
## cURL Example
\`\`\`bash
curl -X POST "https://api.minimax.chat/v1/text/chatcompletion_v2" \\
-H "Authorization: Bearer $MINIMAX_API_KEY" \\
-H "Content-Type: application/json" \\
-d '{
"model": "MiniMax-M1",
"messages": [
{"role": "system", "content": "You are helpful"},
{"role": "user", "content": "Hello!"}
],
"max_tokens": 1024,
"temperature": 0.7
}'
\`\`\``
},
{
id: "minimax-embedding",
title: "MiniMax Embeddings API",
category: "embeddings",
provider: "minimax",
keywords: ["minimax", "embeddings", "vector", "semantic"],
content: `# MiniMax Embeddings API
## Endpoint
POST https://api.minimax.chat/v1/embeddings
## Request
\`\`\`json
{
"model": "embo-01",
"texts": ["text1", "text2"],
"type": "query" | "db"
}
\`\`\`
## Response
\`\`\`json
{
"vectors": [
[0.01, 0.02, ...],
[0.03, 0.04, ...]
],
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}
\`\`\`
## Model Details
- embo-01: 1024 dimensions
- type "query": For search queries
- type "db": For database documents
## Python Example
\`\`\`python
import requests
url = "https://api.minimax.chat/v1/embeddings"
headers = {"Authorization": f"Bearer {API_KEY}"}
response = requests.post(url, headers=headers, json={
"model": "embo-01",
"texts": ["Hello world"],
"type": "db"
})
vectors = response.json()["vectors"]
\`\`\``
},
{
id: "minimax-function-calling",
title: "MiniMax Function Calling",
category: "tools",
provider: "minimax",
keywords: ["minimax", "function", "tools", "tool calling"],
content: `# MiniMax Function Calling
## Tool Definition
\`\`\`json
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather for location",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string"},
"unit": {"type": "string", "enum": ["celsius", "fahrenheit"]}
},
"required": ["location"]
}
}
}
\`\`\`
## Usage
Same pattern as OpenAI:
1. Send tools in request
2. Model returns tool_calls in response
3. Execute tool
4. Send result back with role "tool" and tool_call_id
## Python Example
\`\`\`python
response = requests.post(url, headers=headers, json={
"model": "MiniMax-M1",
"messages": [
{"role": "user", "content": "What's weather in Tokyo?"}
],
"tools": [
{
"type": "function",
"function": {
"name": "get_weather",
"description": "Get weather",
"parameters": {
"type": "object",
"properties": {
"location": {"type": "string"}
},
"required": ["location"]
}
}
}
]
})
\`\`\``
},
{
id: "minimax-rate-limits",
title: "MiniMax Rate Limits & Pricing",
category: "limits",
provider: "minimax",
keywords: ["minimax", "rate limit", "pricing", "cost"],
content: `# MiniMax Rate Limits & Pricing
## Rate Limits
- Varies by plan and model
- Contact MiniMax for specific limits
## Pricing
- MiniMax-M1: ~Â¥0.01-0.02 per 1K tokens (varies)
- abab6.5: Lower cost per token
- Check official docs for current pricing
## Error Codes
- 1000: Invalid parameter
- 1001: Authentication failed
- 1004: Rate limit exceeded
- 1008: Model overloaded
- 1013: Context length exceeded
## Context Windows
- MiniMax-M1: Up to 1M tokens (with long context mode)
- abab6.5: 8K tokens
- abab6.5s/g: 8K tokens`
}
];
//# sourceMappingURL=minimax.js.map