检索文件

型号与创建入口核对日期:2026-10-08。来源:apizt 当前模型目录。目录收录不等于你的令牌已开通权限,提交前核对账户模型与价格。

GEThttps://api.apizt.com/minimax/v1/files/retrieve在线调试 →

请求参数

参数说明
file_idURL 查询参数;填入对应资源 ID。

GET 请求不发送 body。路径中的任务 ID 和 URL 查询参数须替换为自己的值。

请求示例代码

先设置 tokenba_API_KEY;Python 安装 requests,JavaScript 使用 Node.js 20+。示例未进行付费生成实测。

curl --fail-with-body --request GET "https://api.apizt.com/minimax/v1/files/retrieve?file_id=YOUR_FILE_ID" \
  --header "Authorization: Bearer $tokenba_API_KEY"
import os
import requests

headers = {"Authorization": f"Bearer {os.environ['tokenba_API_KEY']}"}
response = requests.get('https://api.apizt.com/minimax/v1/files/retrieve?file_id=YOUR_FILE_ID', headers=headers, timeout=60)
response.raise_for_status()
print(response.json())
(async () => {
  const headers = { Authorization: `Bearer ${process.env.tokenba_API_KEY}` };
  const response = await fetch("https://api.apizt.com/minimax/v1/files/retrieve?file_id=YOUR_FILE_ID", { method: "GET", headers });
  if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
  console.log(await response.json());
})().catch(console.error);

取得下载地址

该接口返回文件元数据 JSON。读取 file.download_url 后请求该地址下载媒体;不要携带 apizt API Key 请求第三方下载地址。

字段参考:MiniMax 文件检索。