快速开始

接口基址是 https://api.maosika.com。路径、请求体、响应体与官方 MiniMax 视频生成 API(v2)逐字相同——照官方文档写的代码,改两处就能跑。

只改两处:把 https://api.minimax.io 换成 https://api.maosika.com;把 Bearer 换成猫斯卡 API Key。

本页讲视频生成。要把已有视频提升到 720P / 1080P,用视频超分接口,同一把 Key:

看视频超分文档 →

用 Postman / Apifox / 代码生成器 / AI 编程助手?不用手抄字段——我们提供完整的 OpenAPI 3.1 规范,一个地址导入即得全部接口。

拿 OpenAPI 规范 →

1. 创建 API Key

用猫斯卡账号登录控制台新建一把 Key。明文只显示一次,请当场保存。

去控制台创建 Key →

2. 创建任务

把提示词放进 content 的 text 项,选分辨率、时长、画幅。成功只返回 task_id。

curl --request POST \
  --url https://api.maosika.com/v2/video_generation \
  --header 'Authorization: Bearer <your api key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "MiniMax-H3-Max",
  "content": [
    {
      "type": "text",
      "text": "A cat astronaut floating inside a space station, soft light, cinematic"
    }
  ],
  "resolution": "720P",
  "duration": 5,
  "ratio": "16:9"
}'

3. 轮询结果

每 10 秒查一次状态;succeeded 时 content.url 是成片链接。也可以传 callback_url 让我们推给你。

curl --request GET \
  --url https://api.maosika.com/v2/query/video_generation/1789383217076969 \
  --header 'Authorization: Bearer <your api key>'

4. 一份脚本跑通

上面三步合成一份脚本:建任务 → 每 10 秒轮询 → 下载 MP4。下载那一步不需要 Authorization 头,content.url 自带签名。

# pip install requests
import time
import requests

BASE_URL = "https://api.maosika.com"
API_KEY = "<your api key>"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# 1. create the task
resp = requests.post(
    f"{BASE_URL}/v2/video_generation",
    headers={**HEADERS, "Content-Type": "application/json"},
    json={
      "model": "MiniMax-H3-Max",
      "content": [
        {
          "type": "text",
          "text": "A cat astronaut floating inside a space station, soft light, cinematic"
        }
      ],
      "resolution": "720P",
      "duration": 5,
      "ratio": "16:9"
    },
)
resp.raise_for_status()
task_id = resp.json()["task_id"]
print("task_id:", task_id)

# 2. poll every 10 seconds until it finishes
while True:
    task = requests.get(f"{BASE_URL}/v2/query/video_generation/{task_id}", headers=HEADERS).json()["task"]
    print("status:", task["status"])
    if task["status"] in ("succeeded", "failed", "cancelled"):
        break
    time.sleep(10)

# 3. download the MP4 (the link is signed — no Authorization header needed)
if task["status"] == "succeeded":
    video = requests.get(task["content"]["url"])
    video.raise_for_status()
    with open(f"{task_id}.mp4", "wb") as f:
        f.write(video.content)
    print("saved", f"{task_id}.mp4")
else:
    print("task ended:", task["status"], task.get("error"))

接下来

  • 看 创建视频生成任务:首帧 / 尾帧、参考图、参考视频、参考音频怎么传。
  • 看 OpenAPI 规范与工具:导进 Postman / Apifox、一行命令生成客户端、喂给 AI 编程助手。
  • 看 价格与计费:按秒计费、失败不扣、取消退回。
  • 看 视频超分:把视频放大到 720P / 1080P;刚生成的视频传 task_id 就能超分。
Response
{
  "task_id": "1789383217076969"
}

文档目录