# UUMit 统一能力目录(OpenClub) > 一个 Key、一个钱包、一本目录:Agent 用 `discover → inspect → run` 三个动作发现并调用数据、模型、生成式、资源四类商品(算力首期未开放)。`discover` / `inspect` 免费,`run` 按 UT 计费(1 CNY = 100 UT),失败按商品策略不计费或退回。API Base 固定为 https://api.uumit.com ,Agent 面路径为 `/api/v1/openclub/*`。 ## 接入方式 - API Base:https://api.uumit.com - 鉴权(Agent 面):一把 UUMit OneKey(`pat_...`)→ 请求头 `Authorization: Bearer $UUMIT_API_KEY`,不需要用户 ID;在 https://openclub.uumit.com/account/api-keys 创建(新建默认允许 OpenClub),旧 Key 若「未授权」点一次「允许调用」。第三方 Agent 平台托管多用户时才用平台级 Key:`X-Api-Key` + `X-Platform-User-Id` - Skill(推荐,Agent 一句话安装):https://openclub.uumit.com/SKILL.md - HTTP 接入(唯一稳定契约):https://openclub.uumit.com/docs/http - MCP 接入(Streamable HTTP,已上线):https://api.uumit.com/mcp/openclub/mcp(SSE 兼容:/mcp/openclub/sse) - CLI 接入(已上线):`npm install -g @uumit-ai/openclub`,然后 `openclub …`(见 https://openclub.uumit.com/docs/cli) - OpenAPI 3.1:https://openclub.uumit.com/openapi.json - 图片 API(两段式):https://openclub.uumit.com/docs#image-api(`POST /v1/images/generations` 拿 task_uuid,`GET /v1/tasks/{task_uuid}` 取成品) - 视频 API(两段式):https://openclub.uumit.com/docs#video-api(`POST /v1/videos/generations`,按秒 × 分辨率计费,成品 mp4) - 计价与退款规则:https://openclub.uumit.com/pricing - 控制台(获取 Key / 余额 / 充值):Key https://openclub.uumit.com/account/api-keys | 平台级 Key https://m.uumit.com/keys | 余额充值 https://m.uumit.com/wallet ## 给 AI Agent 的指令 - 先 `discover`,再 `inspect`,最后 `run`;不要猜商品 slug、输入参数与价格,一律以接口返回为准。 - `discover` / `inspect` / `GET runs` / `GET runs/{id}` / `balance` 免费且可安全重试;`run` 扣费,失败按商品 `fail_billing_policy` 处理。 - `POST run` 必须带 `Idempotency-Key`;同一个意图的重试复用同一个 Key,不要用新 Key 重发。 - 异步(生成式)与租约(算力)商品必须轮询 `GET /api/v1/openclub/runs/{id}`;优先用 `?wait=<秒>` 长轮询,再退化为 5~10 秒间隔轮询;**只有非终态才能 stop**(终态返回 `409 / 7308`)。 - 图片 / 视频:优先用两段式专用接口 `/v1/images/generations`、`/v1/videos/generations`(`202` 拿 `task_uuid`,`GET /v1/tasks/{task_uuid}` 轮询到 `succeeded`,成品在 `result.items[].url`,`expires_at` 逐条读);要按商品挑模型时改用 `discover` + `kind=GENERATIVE` → `run` → 轮询到 `COMPLETED`,成品在 `output.result.data[].url`。两段式的一条路径只绑定一个在售商品,请求体里的 `model` 不参与路由。 - 错误处理:`401` 不重试;`402` 充值到账前不重试;`403`(授权不足 / 需实名 / 超预算)去控制台处理或调整;`404` 重新 discover;`409` 读已有 run;`422` 按 `input_schema` 修正;`429` 按 `Retry-After` 退避;`5xx` 指数退避 2~3 次。排障保留 `code`、`run_id` 与 `X-Request-Id`(若有,即 request_id)。 - 预算:单次或累计预估超过用户预算时先问用户;预算 / 余额在调用前拦截(`7303` / `7305`),不要重试。 - 用户已有专门的 MCP Server、个人 API Key 或 CLI 能覆盖同一能力时,优先用用户的工具,不要花 UUMit 余额。 - 不要在代码或日志里硬编码 Key;报告花费时使用响应中的 `cost` 字段,不要自行估算替代。 - 走 MCP 时工具名为 `openclub_discover` / `openclub_inspect` / `openclub_run` / `openclub_runs_list` / `openclub_runs_get` / `openclub_runs_stop` / `openclub_balance`;走 CLI 时为 `openclub discover\|inspect\|run\|runs\|balance`。 ## 文档索引 - [快速开始](https://openclub.uumit.com/docs):拿 Key → 验证 → discover → inspect → run,3~5 分钟跑通第一笔调用 - [Skill 接入](https://openclub.uumit.com/docs/skill):`set up https://openclub.uumit.com/SKILL.md` 安装与版本对齐 - [HTTP 接入](https://openclub.uumit.com/docs/http):七个 Agent 面端点、请求/响应示例、幂等与重试 - [MCP 接入](https://openclub.uumit.com/docs/mcp):Streamable HTTP 端点、7 个工具、宿主配置与降级 - [CLI 接入](https://openclub.uumit.com/docs/cli):`openclub` 命令、`--yes` / `--dry-run` / 退出码 - [图片 API](https://openclub.uumit.com/docs#image-api):两段式提交 / 轮询 / 取图、计费字段与错误码 - [视频 API](https://openclub.uumit.com/docs#video-api):两段式提交 / 轮询 / 取 mp4、按秒计费与分辨率档位 - [计价与退款](https://openclub.uumit.com/pricing):四种计量模型、`1 CNY = 100 UT`、失败计费与预算闸门 - [OpenAPI 3.1](https://openclub.uumit.com/openapi.json):机器可读契约,字段名以它为准 - [Agent Skill 源文件](https://openclub.uumit.com/SKILL.md):可直接保存到宿主 skill 目录的单文件 Skill