DOCSPontx Hub
公开文档v1
本页5 分钟快速开始

快速开始 / 约 5 分钟

用 5 分钟接入一个 API。

5 分钟完成 Pontx Hub CLI 安装、API 搜索、接口参数检查、请求预览和统一 SDK 集成。

01

安装统一 CLI

需要 Node.js 20 或更高版本。

终端
pnpm add --global @pontx/hub-cli
pontx-hub --version

只想先看看?网站无需安装,打开 API 目录即可完成同样的发现与预演流程。

02

搜索并检查

可以按能力、入参、出参或数据结构自然语言搜索。

  1. 1
    搜索你要做的事

    需要把结果交给脚本时加上 --json。

  2. 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/ExchangeRateResponse
03

预演再调用

preview 会解析最终 URL、查询参数、脱敏请求头与请求体,但不会发送到供应商。

安全请求流程
pontx-hub frankfurter preview 'Exchange Rates' getLatestRates --base USD

# Only call after the preview looks right.
pontx-hub frankfurter call 'Exchange Rates' getLatestRates --base USD
04

进入 SDK 集成

确认接口后,查看运营方发布的准确包名与版本。

检查并安装 SDK
pontx-hub sdk frankfurter
pnpm add @pontx/frankfurter
→

继续阅读 SDK 指南,了解统一包命名、客户端形状与独立 API CLI。

打开 SDK 指南