MonstarX Platform API
要点从自己的脚本和服务自动操作MonstarX。创建账户API密钥,提交需求并跟踪任务。发布前请检查应用。
在设置 → API & MCP中创建账户密钥,将其作为服务器机密保存到MONSTARX_API_KEY。切勿把密钥放入浏览器代码。
export MONSTARX_API_KEY='your-account-key'export MONSTARX_API_BASE='https://monstarx.com/api/v1'curl --fail-with-body "$MONSTARX_API_BASE/account" \ -H "Authorization: Bearer $MONSTARX_API_KEY"import jsonimport osimport urllib.request
request = urllib.request.Request( "https://monstarx.com/api/v1/account", headers={"Authorization": "Bearer " + os.environ["MONSTARX_API_KEY"]},)with urllib.request.urlopen(request, timeout=30) as response: print(json.load(response))const response = await fetch('https://monstarx.com/api/v1/account', { headers: { Authorization: `Bearer ${process.env.MONSTARX_API_KEY}` },});const data = await response.json();if (!response.ok) throw new Error(JSON.stringify(data));console.log(data);API还是MCP?
Section titled “API还是MCP?”脚本、服务和CI适合使用API。Claude Code、Codex或Cursor等对话式编程代理适合使用MCP。两者共用账户的正常用量额度。
英文技术参考
Section titled “英文技术参考”请查看英文完整指南,了解端点、任务状态、重试、发布已审核版本及验证Webhook签名。