1
安装 Anthropic SDK(推荐)
2
调用 MiniMax-M3
Python
3
示例输出
探索更多
语言模型
探索 MiniMax 最新语言模型
视频生成
使用 MiniMax-H3 创建视频生成任务
同步语音合成
使用 Speech 2.8 进行同步语音合成
异步语音合成
使用 Speech 2.8 进行异步语音合成
音色复刻
创建音色复刻任务
音乐生成
使用 Music 3.0 进行音乐创作
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
🎉 MiniMax H3 全新发布!新一代开放通用多模态视频模型。查看文档 ➔
使用 Anthropic SDK 快速接入 MiniMax API,开始调用 MiniMax-M3 模型。
安装 Anthropic SDK(推荐)
pip install anthropic
npm install @anthropic-ai/sdk
调用 MiniMax-M3
import anthropic
client = anthropic.Anthropic()
message = client.messages.create(
model="MiniMax-M3",
max_tokens=1000,
system="You are a helpful assistant.",
messages=[
{
"role": "user",
"content": [
{
"type": "text",
"text": "Hi, how are you?"
}
]
}
]
)
for block in message.content:
if block.type == "thinking":
print(f"Thinking:\n{block.thinking}\n")
elif block.type == "text":
print(f"Text:\n{block.text}\n")
示例输出
{
"thinking": "The user is just greeting me casually. I should respond in a friendly, professional manner.",
"text": "Hi there! I'm doing well, thanks for asking. I'm ready to help you with whatever you need today—whether it's coding, answering questions, brainstorming ideas, or just chatting. What can I do for you?"
}
此页面对您有帮助吗?