01 · Getting Started
快速开始
三步出图。所有命令免安装,npx -y mindeck-aip 直接调用。
1. 登录拿 token
shell
npx -y mindeck-aip login \ --identifier you@example.com \ --password '你的密码' \ --baseUrl https://image.mindeck.cloud
token 自动写入 ~/.config/aip/config.json。
2. 生成一张图
shell
npx -y mindeck-aip generate "电影感汽车海报,雨夜街头,霓虹反射" \ --size 1024x1024 --model standard --json
3. 等待并下载
shell
# 查看历史与状态 npx -y mindeck-aip images --json # status=succeeded 后下载 npx -y mindeck-aip image-download <generation-id> ./output.png
给 AI 直接调用?
跳到 /agent 复制现成模板粘贴给你的 AI,它会自动签发 token、生图、下载。
02 · Authentication
认证
邮箱密码登录
最常见的方式。CLI 把签发的 Bearer token 存到本地 config,后续命令自动带上。
shell
npx -y mindeck-aip login \
--identifier you@example.com \
--password '你的密码' \
--baseUrl https://image.mindeck.cloud
# 返回: { ok, token, user }Token 导入
已经有 token(例如从 /agent 复制的),直接导入。
shell
npx -y mindeck-aip import-token aip_xxxxxxxxxxxx \ --baseUrl https://image.mindeck.cloud
Web 端配对(适合本机没浏览器)
在网页 /pick 上生成 8 位配对码,CLI 输入即可。
shell
npx -y mindeck-aip pair --code ABCD2345
03 · Image Generation
图像生成
文生图
shell
npx -y mindeck-aip generate "一只穿宇航服的橘猫漂浮在土星环旁" \ --size 1024x1024 \ --model standard \ --quality high \ --json
图生图(带参考图)
最多 3 张参考图,自动 base64 编码上传。
shell
npx -y mindeck-aip generate "把背景换成雪山" \ --input ./photo.jpg \ --input-2 ./style.png \ --size 1024x1024 --json
模式与尺寸
| 模式 | model | 最高分辨率 | 积分 |
|---|---|---|---|
| standard | gpt-image-2 | 2K | 5 |
| pro | gpt-image-2 |
04 · Knowledge Base
知识库(云文档)
快速记录
shell
npx -y mindeck-aip capture "今天的会议要点:……"
读写文档
shell
npx -y mindeck-aip read /notes/2026/q2-plan.md npx -y mindeck-aip write /notes/draft.md "# 草稿\n内容..." npx -y mindeck-aip append /notes/log.md "今日完成 X"
目录与搜索
shell
npx -y mindeck-aip tree # 查看文档树 npx -y mindeck-aip find "关键词" npx -y mindeck-aip mkdir /notes/new npx -y mindeck-aip mv /notes/a.md /notes/archive/a.md
05 · Drive
云盘
上传
shell
npx -y mindeck-aip upload ./report.pdf --name report.pdf
列表与详情
shell
npx -y mindeck-aip files # 列出所有文件 npx -y mindeck-aip file <id> # 文件详情 npx -y mindeck-aip download <id> ./local.pdf npx -y mindeck-aip rm <id>
文件夹
shell
npx -y mindeck-aip folders # 列文件夹 npx -y mindeck-aip folder-create "项目 A" npx -y mindeck-aip folder-rename <id> "新名" npx -y mindeck-aip file-move <file-id> --folder-id <id>
06 · Temp Mail
临时邮箱
生成 @mindeck.cloud 一次性邮箱并实时收件,自动识别 6 位验证码。 适合 AI 注册第三方账号时自助收码。需后台为账号开启「临时邮箱」权限;邮箱按账号隔离,只能读自己生成的邮箱。
生成邮箱
shell
curl -X POST https://math.mindeck.cloud/api/mail/generate \
-H "Authorization: Bearer <token>" -H "Content-Type: application/json" \
-d '{"label":"openai-reg"}'
# => {"ok":true,"id":"...","email":"abcd1234@mindeck.cloud","label":"openai-reg"}历史邮箱 / 收件
shell
# 列出本账号生成过的所有邮箱 curl https://math.mindeck.cloud/api/mail/list -H "Authorization: Bearer <token>" # 收件列表(验证码类邮件直接带 6 位 code 字段) curl "https://math.mindeck.cloud/api/mail/inbox?email=abcd1234@mindeck.cloud" \ -H "Authorization: Bearer <token>" # 读单封正文 curl "https://math.mindeck.cloud/api/mail/message?email=abcd1234@mindeck.cloud&id=<msgId>" \ -H "Authorization: Bearer <token>"
阻塞等验证码(注册场景)
07 · HTTP API
原生 HTTP API
所有 CLI 命令本质都是这些 HTTP 接口。Header 加 Authorization: Bearer <token>。
| 方法 | 路径 | 作用 |
|---|---|---|
| POST | /api/agent/auth/login | 邮箱密码换 token |
| POST | /api/agent/auth/tokens | 签发 CLI token(Web 会话) |
| POST | /api/agent/auth/pair | 用配对码换 token |
| POST | /api/images/generate | 发起生图 |
| GET | /api/images/history | 列出历史 |
| GET | /api/images/[id] | 单条详情 |
| GET | /api/images/[id]/download | 下载 PNG |
| POST | /api/images/[id]/cancel | 取消任务 |
| GET | /api/me/quota | 查看积分 |
| POST | /api/agent/capture |
08 · Errors
错误码
401 Unauthorized· token 缺失或失效,重新 login429 Too Many Requests· 单用户并发超 10,等已有任务完成insufficient_user_quota· 上游网关余额不足,会自动 fallback;持续看到代表 fallback 也炸了usage_limit_reached· ChatGPT Plus 池打满,分钟级自动恢复content_policy_violation· prompt 命中安全策略,重写后重试
09 · FAQ
常见问题
npx 每次都重新下载吗?
不会。首次 4 秒,之后命中 npx 缓存几乎瞬时。
token 会过期吗?
不会自动过期,但你可以在设置里随时撤销。建议给每个 AI / 设备签发独立 token。
能不能不用 CLI,直接 curl?
可以。看上面「原生 HTTP API」。所有响应是 JSON。
生图大概多久?
standard 1024 约 40-60 秒,vip 4K 约 90-120 秒,看上游负载。