快速开始 / 约 5 分钟
用 5 分钟接入一个 API。
安装 Pontx Hub CLI,搜索接口、检查 Schema、预演请求,再生成类型安全的 SDK 集成。
01发现
pontx-hub search02理解
pontx-hub show03验证
pontx-hub preview04集成
pontx-hub sdk01
安装统一 CLI
需要 Node.js 20 或更高版本。
pnpm add --global @pontx/hub-cli
pontx-hub --version只想先看看?网站无需安装,打开 API 目录即可完成同样的发现与预演流程。
02
搜索并检查
可以按能力、入参、出参或数据结构自然语言搜索。
- 1搜索意图
加上 --json 可获得稳定、可编程的结果与匹配原因。
- 2复制稳定资源 ID
搜索结果中的 API、Endpoint 与 Schema ID 都可交给 show。
pontx-hub search "把欧元换算成美元的接口" --locale zh --json
pontx-hub show endpoint:frankfurter/get-latest-rates
pontx-hub show schema:frankfurter/ExchangeRateResponse03
预演再调用
preview 会解析最终 URL、查询参数、脱敏请求头与请求体,但不会发送到供应商。
pontx-hub frankfurter preview 'Exchange Rates' getLatestRates --base USD
# Only run after the preview matches your intent.
pontx-hub frankfurter call 'Exchange Rates' getLatestRates --base USD04
进入 SDK 集成
确认接口后,查看运营方发布的准确包名与版本。
pontx-hub sdk frankfurter
pnpm add @pontx/frankfurter