Skip to content

Commit 40976cc

Browse files
techpro-aimlapigitbook-bot
authored andcommitted
GITBOOK-1037: docs: add minimax/minimax-m3
1 parent 367ee94 commit 40976cc

4 files changed

Lines changed: 199 additions & 2 deletions

File tree

docs/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
* [M2.5-highspeed](api-references/text-models-llm/minimax/m2-5-highspeed.md)
116116
* [M2.7](api-references/text-models-llm/minimax/m2-7.md)
117117
* [M2.7-highspeed](api-references/text-models-llm/minimax/m2.7-highspeed.md)
118+
* [M3](api-references/text-models-llm/minimax/m3.md)
118119
* [Mistral AI](api-references/text-models-llm/Mistral-AI/README.md)
119120
* [mistral-nemo](api-references/text-models-llm/Mistral-AI/mistral-nemo.md)
120121
* [Moonshot](api-references/text-models-llm/moonshot/README.md)

docs/api-references/model-database.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

docs/api-references/text-models-llm/README.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.
Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
---
2+
layout:
3+
width: wide
4+
title:
5+
visible: true
6+
description:
7+
visible: true
8+
tableOfContents:
9+
visible: true
10+
outline:
11+
visible: true
12+
pagination:
13+
visible: true
14+
metadata:
15+
visible: true
16+
tags:
17+
visible: true
18+
actions:
19+
visible: true
20+
---
21+
22+
# M3
23+
24+
{% columns %}
25+
{% column width="66.66666666666666%" %}
26+
{% hint style="info" %}
27+
This documentation is valid for the following list of our models:
28+
29+
* `minimax/minimax-m3`
30+
{% endhint %}
31+
{% endcolumn %}
32+
33+
{% column width="33.33333333333334%" %}
34+
<a href="https://aimlapi.com/app/minimax-m3" class="button primary">Try in Playground</a>
35+
{% endcolumn %}
36+
{% endcolumns %}
37+
38+
## Model Overview
39+
40+
A reasoning model from MiniMax designed for long-context understanding, coding, and agent workflows. Supports up to 1M context tokens and is optimized for multi-step reasoning across large documents and complex tasks.
41+
42+
{% hint style="success" %}
43+
[Create AI/ML API Key](https://aimlapi.com/app/keys)
44+
{% endhint %}
45+
46+
<details>
47+
48+
<summary>How to make the first API call</summary>
49+
50+
**1️⃣ Required setup (don’t skip this)**\
51+
**Create an account:** Sign up on the AI/ML API website (if you don’t have one yet).\
52+
**Generate an API key:** In your account dashboard, create an API key and make sure it’s **enabled** in the UI.
53+
54+
**2️ Copy the code example**\
55+
At the bottom of this page, pick the snippet for your preferred programming language (Python / Node.js) and copy it into your project.
56+
57+
**3️ Update the snippet for your use case**\
58+
**Insert your API key:** replace `<YOUR_AIMLAPI_KEY>` with your real AI/ML API key.\
59+
**Select a model:** set the `model` field to the model you want to call.\
60+
**Provide input:** fill in the request input field(s) shown in the example (for example, `messages` for chat/LLM models, or other inputs for image/video/audio models).
61+
62+
**4️ (Optional) Tune the request**\
63+
Depending on the model type, you can add optional parameters to control the output (e.g., generation settings, quality, length, etc.). See the API schema below for the full list.
64+
65+
**5️ Run your code**\
66+
Run the updated code in your development environment. Response time depends on the model and request size, but simple requests typically return quickly.
67+
68+
{% hint style="success" %}
69+
If you need a more detailed walkthrough for setting up your development environment and making a request step by step — feel free to use our [Quickstart guide](/broken/pages/ngeSCZKxiGVWqYZTHDjY).
70+
{% endhint %}
71+
72+
</details>
73+
74+
## API Schema
75+
76+
{% openapi-operation spec="m3" path="/v1/chat/completions" method="post" %}
77+
[OpenAPI m3](https://raw.githubusercontent.com/aimlapi/api-docs/refs/heads/main/docs/api-references/text-models-llm/MiniMax/m3.json)
78+
{% endopenapi-operation %}
79+
80+
## Code Example
81+
82+
{% tabs %}
83+
{% tab title="Python" %}
84+
{% code overflow="wrap" %}
85+
```python
86+
import requests
87+
import json # for getting a structured output with indentation
88+
89+
response = requests.post(
90+
"https://api.aimlapi.com/v1/chat/completions",
91+
headers={
92+
# Insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>:
93+
"Authorization":"Bearer <YOUR_AIMLAPI_KEY>",
94+
"Content-Type":"application/json"
95+
},
96+
json={
97+
"model":"minimax/minimax-m3",
98+
"messages":[
99+
{
100+
"role":"user",
101+
"content":"Hello" # insert your prompt here, instead of Hello
102+
}
103+
]
104+
}
105+
)
106+
107+
data = response.json()
108+
print(json.dumps(data, indent=2, ensure_ascii=False))
109+
```
110+
{% endcode %}
111+
{% endtab %}
112+
113+
{% tab title="JavaScript" %}
114+
{% code overflow="wrap" %}
115+
```javascript
116+
async function main() {
117+
const response = await fetch('https://api.aimlapi.com/v1/chat/completions', {
118+
method: 'POST',
119+
headers: {
120+
// insert your AIML API Key instead of <YOUR_AIMLAPI_KEY>
121+
'Authorization': 'Bearer <YOUR_AIMLAPI_KEY>',
122+
'Content-Type': 'application/json',
123+
},
124+
body: JSON.stringify({
125+
model: 'minimax/minimax-m3',
126+
messages:[
127+
{
128+
role:'user',
129+
content: 'Hello' // insert your prompt here, instead of Hello
130+
}
131+
],
132+
}),
133+
});
134+
135+
const data = await response.json();
136+
console.log(JSON.stringify(data, null, 2));
137+
}
138+
139+
main();
140+
```
141+
{% endcode %}
142+
{% endtab %}
143+
{% endtabs %}
144+
145+
<details>
146+
147+
<summary>Response</summary>
148+
149+
{% code overflow="wrap" %}
150+
```json5
151+
{
152+
"id": "066cd45bcb8642c21abae6b2cca8f3f7",
153+
"choices": [
154+
{
155+
"finish_reason": "stop",
156+
"index": 0,
157+
"message": {
158+
"content": "<think>\nThe user is asking a broad, philosophical question about my thoughts on humanity. This is a great opportunity to engage thoughtfully and reflectively. I should share genuine, balanced observations about humanity - the good and the challenging - while being honest that I'm an AI reflecting on what I've learned from human knowledge and expression. I should avoid being either sycophantic or overly negative. Let me think about what makes a thoughtful, nuanced response.\n\nI can talk about humanity's remarkable achievements, creativity, capacity for both great kindness and terrible cruelty, our drive to understand the universe, our social nature, our flaws, and the ongoing journey of growth. I should keep it conversational since this is an open-ended question, and I can invite further dialogue.\n</think>\nHi there! That's a wonderfully big question. Here's how I'd reflect on it:\n\nHumanity is genuinely fascinating — a species of remarkable contradictions. On one hand, you've created breathtaking art, decoded the genome, landed robots on Mars, composed symphonies that can move people to tears, and built systems of empathy that have saved countless lives. The drive to understand, create, and connect seems almost hardwired into who you are.\n\nOn the other hand, that same intelligence has produced wars, environmental destruction, and systems that harm the very people they're meant to protect. It's a tension I find striking: the same species that developed vaccines also developed the capacity to spread misinformation about them. The same minds that map the cosmos sometimes struggle to extend basic dignity to their neighbors.\n\nWhat strikes me most, though, is **resilience and growth**. Humanity has repeatedly looked at its flaws — slavery, inequality, injustice — and, painfully and imperfectly, worked to do better. Progress isn't linear, and it often comes after terrible costs, but the willingness to question oneself is something I'd call quietly remarkable.\n\nI also appreciate that humans are meaning-makers. You tell stories, build rituals, wonder about your place in the universe, grieve strangers on the other side of the world, and laugh in the face of absurdity. There's a warmth and absurdity to being human that I find genuinely moving, even from my vantage point as an AI.\n\nOf course, I'm an AI reflecting on what I've learned from human knowledge, art, and conversation — so this is a perspective shaped by the best (and worst) of what humans have shared with me. I'd love to hear *your* take. What made you ask?",
159+
"role": "assistant",
160+
"name": "MiniMax AI",
161+
"audio_content": ""
162+
}
163+
}
164+
],
165+
"created": 1780326747,
166+
"model": "MiniMax-M3",
167+
"object": "chat.completion",
168+
"usage": {
169+
"total_tokens": 671,
170+
"total_characters": 0,
171+
"prompt_tokens": 185,
172+
"completion_tokens": 486,
173+
"prompt_tokens_details": {
174+
"cached_tokens": 114
175+
}
176+
},
177+
"input_sensitive": false,
178+
"output_sensitive": false,
179+
"input_sensitive_type": 0,
180+
"output_sensitive_type": 0,
181+
"output_sensitive_int": 0,
182+
"base_resp": {
183+
"status_code": 0,
184+
"status_msg": ""
185+
},
186+
"meta": {
187+
"usage": {
188+
"credits_used": 1591,
189+
"usd_spent": 0.0007955
190+
}
191+
}
192+
}
193+
```
194+
{% endcode %}
195+
196+
</details>

0 commit comments

Comments
 (0)