AGTCloud API Docs
文件指南API Reference整合與資源更新與幫助
各廠商欄位特性差異

MiniMax 參數與協定差異

了解 MiniMax 系列模型在相容協定下的參數差異與使用方式。

使用 MiniMax 模型時,根據本頁調整所選協定的參數。完整請求和回應結構參閱 Chat Completions、Responses 和 Messages。

適用模型

模型適用範圍
MiniMax-M3.1-FlashChat、Responses、Messages;始終開啟思考,可調節思考深度
MiniMax-M3Chat、Responses、Messages;思考可以開關,各協定預設狀態不同

Chat Completions 差異

欄位差異說明
thinking.type兩款模型預設均為 adaptive;M3 可設為 disabled 關閉思考,M3.1-Flash 傳入 disabled 回傳 400
reasoning_effortM3.1-Flash 支援 low/medium/high/xhigh/max,預設 max,傳入 none 回傳 400;M3 忽略此欄位
reasoning_splitMiniMax 擴展:true 將思考單獨放在 reasoning_content 中,false 將其放在 content 的 <think> 標籤中;不控制思考開關,M3.1-Flash 不支援 false
temperature、top_p傳入值被忽略,實際分別使用 1、0.95;top_p 若傳入仍須滿足 (0,1]
presence_penalty、frequency_penalty、logit_bias傳入值被忽略
max_completion_tokens最小 1,最大 524288,推薦 131072;包含思考與最終回答,推薦值不等於預設值
service_tierM3 支援 standard/priority,預設 standard;M3.1-Flash 不支援此欄位
歷史 assistant 消息工具對話須完整回傳,包括 reasoning_content、content 和 tool_calls;簡單工具呼叫可能沒有可見思考欄位

Responses 差異

欄位差異說明
reasoning.effortM3.1-Flash 始終推理,支援 low/medium/high/xhigh/max,預設 max,none 回傳 400;M3 預設關閉,非 none 檔位可開啟,但不調節深度
temperature、top_p傳入值被忽略,實際分別使用 1、0.95;top_p 若傳入仍須滿足 (0,1]
max_output_tokens思考 Token 也計入輸出預算;預算過小可能使回應為 incomplete,且沒有最終回答的 message 項
tool_choice僅支援 auto
text.format.type當前僅定義 text
store請求值被忽略,回應固定為 false
previous_response_id、conversation請求值被忽略,回應固定為 null;多輪由用戶端完整回傳歷史輸入和輸出,包括 reasoning 與工具呼叫專案
parallel_tool_calls、truncation請求值被忽略,回應分別固定為 true、disabled
service_tierM3 支援 standard/priority,預設 standard;M3.1-Flash 不支援此欄位
伺服器端搜索Beta 工具,在 tools 中使用 type: "web_search"

Messages 差異

欄位差異說明
thinking.typeM3.1-Flash 始終開啟,僅接受 adaptive,disabled 回傳 400;M3 預設關閉,可用 adaptive 開啟或 disabled 關閉
output_config.effortM3.1-Flash 支援 low/medium/high/xhigh/max,預設 max,none 回傳 400;M3 忽略此欄位
temperature、top_p傳入值被忽略,實際分別使用 1、0.95;top_p 若傳入仍須滿足 (0,1]
top_k、stop_sequences、mcp_servers、context_management、container傳入值被忽略
max_tokens最小 1,最大 524288,推薦 131072;思考 Token 也計入此上限
tool_choice.type僅支援 auto
service_tierM3 支援 standard/priority,預設 standard;M3.1-Flash 不支援此欄位
歷史 assistant 內容區塊完整保留 thinking、text、tool_use 等塊及思考簽名 signature;簡單工具呼叫可能沒有 thinking 塊
伺服器端搜索Beta 工具,使用 type: "web_search_20250305"、name: "web_search"

快取差異

欄位差異說明
自動前綴快取適用於至少 512 個輸入 Token 的呼叫,無需添加快取標記;前綴按工具定義、系統提示詞、歷史對話內容的順序匹配
cache_control兩款模型均不支援 Anthropic 的顯式快取標記
Responses 的 prompt_cache_key可作為 Prompt 快取路由識別碼

媒體輸入差異

輸入協定內容區塊差異說明
圖片image_urlChat:image_url.url 使用公網 URL 或 Base64 Data URL
影片video_urlChat:video_url.url 使用公網 URL、Base64 Data URL 或原廠 mm_file://{file_id} 引用
圖片input_imageResponses:image_url 可為 URL/Base64 字串,或包含 url、detail 的物件
影片input_videoResponses:video_url 可為 URL/Base64 字串,或包含 url、fps、detail、max_long_side_pixel 的物件
圖片imageMessages:source.type=url 時提供 url;source.type=base64 時提供 media_type、data
影片videoMessages 擴展:source 支援 URL、Base64 或原廠影片檔案引用,可設定抽幀參數
欄位差異說明
detail支援 low/default/high,預設 default;Chat 位於對應媒體物件內,Responses 位於 URL 物件內,Messages 位於 source 內
fps影片抽幀頻率,範圍 0.2~5,預設 1;Chat/Responses 使用影片內容區塊中的 video_url.fps,Messages 使用 source.fps
max_long_side_pixel限製圖片或影片幀的最長邊;Chat 位於媒體物件內,Responses 用於影片 URL 物件,Messages 位於 source 內
媒體大小Chat/Messages 的圖片最大 10 MB,URL/Base64 影片最大 50 MB,請求體最大 64 MB;原廠 Files API 上傳的影片最大 512 MB

mm_file:// 引用來自 MiniMax 原廠檔案上傳接口,本頁不提供 AGTCloud 檔案上傳接口。

呼叫範例

將 MODEL_ID 替換為平台提供的完整模型 ID,API Key 使用自己的值。以下採用 M3.1-Flash 的思考深度設定;M3 的欄位行為見上表。

curl 'https://api.agtcloud.cn/v1/chat/completions' \
  -H 'Authorization: Bearer your-api-key' \
  -H 'Content-Type: application/json' \
  --data '{
    "model": "MODEL_ID",
    "messages": [{"role": "user", "content": "用三點說明如何排查 API 逾時"}],
    "thinking": {"type": "adaptive"},
    "reasoning_effort": "low",
    "max_completion_tokens": 4096
  }'

官方參考

本頁目錄