> For the complete documentation index, see [llms.txt](https://docs.goassay.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.goassay.ai/list-your-api/zh/ru-men/list-a-catalogue-tool.md).

# 上架目录中的工具

将端点连接到目录中已有的工具，完成测试并设置价格。

如果 API 已能提供目录工具的答案，例如 **get\_weather**，请使用此流程。你为现有工具提供端点，无需新建工具或编写其契约。

{% hint style="info" %}
**开始前：**[设置账户与钱包](/list-your-api/zh/ru-men/set-up-your-account.md)。准备好 API 地址和身份验证信息。最简单的方式是使用工具建议的连接设置，并返回兼容的响应。
{% endhint %}

## 操作步骤

{% stepper %}
{% step %}

### 选择工具

打开 **Listings → List a tool**。搜索 API 能回答的工具。阅读返回内容和所需输入，再选择 **Use this tool**。如果已经在提供此工具，改选 **Open your listing**；如果已开始创建，选择 **Continue this draft**。

<figure><img src="https://2968587239-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEVw4IWiK1TgVNFeMYjWm%2Fuploads%2Fgit-blob-800f014e6bb473484ed588dce039a73479e156dd%2Flist-a-catalogue-tool-1.png?alt=media" alt="尚未上架的 geocode_place 目录工具，已标出 Use this tool"><figcaption><p>对于尚未提供的工具，选择 Use this tool。</p></figcaption></figure>
{% endstep %}

{% step %}

### 输入端点

在 **Connect & test** 检查 **Your API's address**。使用此工具对应的端点。不要在地址中放入密码或 API 密钥。端点符合建议设置时，保留 **How we call your API** 下的设置。

<figure><img src="https://2968587239-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEVw4IWiK1TgVNFeMYjWm%2Fuploads%2Fgit-blob-93d38d822e0b76909f5ba47c0d48425e61e15551%2Flist-a-catalogue-tool-2.png?alt=media" alt="API 地址字段，已填写示例 API 基础地址"><figcaption><p>使用 API 基础地址和建议的请求路径。</p></figcaption></figure>

<figure><img src="https://2968587239-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEVw4IWiK1TgVNFeMYjWm%2Fuploads%2Fgit-blob-4b2d872e20a63ad7b35c3c498fe1458530c586b7%2Flist-a-catalogue-tool-3.png?alt=media" alt="How we call your API 卡片，显示示例坐标，已标出 Advanced mapping"><figcaption><p>检查示例输入如何转换为 API 请求。</p></figcaption></figure>
{% endstep %}

{% step %}

### 选择 Assay 的身份验证方式

在 **Authentication** 下选择 API 会检查的方式。Assay 推荐使用签名：不保存任何密钥，API 会拒绝任何未经 Assay 签名的调用。

{% tabs %}
{% tab title="API key" %}
如果 API 已支持通过请求头接收密钥，选择 **API key**。添加请求头前，选择 **Save connection** 保存草稿。这不会调用 API。

<figure><img src="https://2968587239-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEVw4IWiK1TgVNFeMYjWm%2Fuploads%2Fgit-blob-b0087b12ce3d79c774710dec19a2acc55929bcc2%2Flist-a-catalogue-tool-4.png?alt=media" alt="Authentication 卡片，已选择 API key，已标出 Save connection"><figcaption><p>添加密钥请求头前先保存连接。</p></figcaption></figure>

选择 **Add headers**。输入 API 要求的请求头名称和值，再选择 **Save headers**。例如，服务可能需要名为 `X-Api-Key` 的请求头，或 `Authorization`，其值以 `Bearer` 开头，后接你的密钥。

请求头值会加密，之后不会再显示。它们属于此上架项及其地址（协议、主机和端口）；同一地址的其他上架项需要各自的请求头。保存会替换整组请求头，请包含 API 所需的全部请求头。

<figure><img src="https://2968587239-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEVw4IWiK1TgVNFeMYjWm%2Fuploads%2Fgit-blob-dfd09838487720e7b95bc52de1289574289db32d%2Flist-a-catalogue-tool-5.png?alt=media" alt="API 密钥请求头表单，已标出请求头字段和 Save headers"><figcaption><p>保存 Assay 必须发送到 API 的请求头。</p></figcaption></figure>
{% endtab %}

{% tab title="Assay signature" %}
Assay 会为每次调用签名。API 使用 Assay 的公钥检查签名，并拒绝任何没有有效签名的调用。

1. 设置检查：在 API 前部署[无需代码的 Cloudflare Worker](https://docs.goassay.ai/developers/zh/list-your-api/cloudflare-worker)，或[在代码中添加验证器](https://docs.goassay.ai/developers/zh/list-your-api/verify-in-your-code)。
2. 选择 **Assay signature (recommended)**。**How to check the signature** 显示 Assay 发送的请求头和一个 Node 示例。
3. 选择 **Save connection**。

<figure><img src="https://2968587239-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEVw4IWiK1TgVNFeMYjWm%2Fuploads%2Fgit-blob-056d82b1812d872b629c19c33600862ac94b7eca%2Flist-a-catalogue-tool-6.png?alt=media" alt="身份验证选项，已选择 Assay signature recommended"><figcaption><p>端点验证 Assay 的调用时，选择签名方式。</p></figcaption></figure>
{% endtab %}
{% endtabs %}

**Both** 会发送签名和已保存的密钥请求头。**Neither** 允许任何知道端点地址的人免费调用；只有在 API 本就打算公开时才选择它。
{% endstep %}

{% step %}

### 运行测试调用

在 **Test it** 下输入有用的示例输入。对于 **get\_weather**，使用纬度 `38.72` 和经度 `-9.14`。选择 **Save and run test**。测试会实际请求 API，但不会向任何人收费，也不计入你的承诺表现。

<figure><img src="https://2968587239-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEVw4IWiK1TgVNFeMYjWm%2Fuploads%2Fgit-blob-93881e6cbc112279490d1d9d3950c65b87b73740%2Flist-a-catalogue-tool-7.png?alt=media" alt="天气测试表单，显示示例坐标，已标出 Save and run test"><figcaption><p>使用应能返回有用答案的输入。</p></figcaption></figure>
{% endstep %}

{% step %}

### 查看测试

阅读 **Request built**、**Your API answered**、**Output mapped** 和 **Checks**。测试通过后，选择 **Continue to Go live** 继续。如果之后修改连接，请重新测试。

<figure><img src="https://2968587239-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEVw4IWiK1TgVNFeMYjWm%2Fuploads%2Fgit-blob-7827dbcf1eafa87037124bccf9f984fb274f3f9d%2Flist-a-catalogue-tool-8.png?alt=media" alt="天气测试结果，显示请求、API 回答、映射后输出和检查"><figcaption><p>继续前检查结果。</p></figcaption></figure>
{% endstep %}

{% step %}

### 设置价格和免费额度

在 **Go live** 中选择智能体如何付款。要先提供免费额度再收费，选择 **Free + paid**，输入 **Price per call**，并保留 **Free calls per agent per day** 的默认值 100。每个智能体用完额度后才按你的价格付款。**Paid** 对每次调用收费；**Free** 没有收益，也无需质押。

保留 **Failures you promise to stay under** 的默认值 2%，除非 API 需要更长时间，否则无需展开 **Advanced**（**Time we wait for your API**）。阅读 **Summary**，了解客户价格、扣除 Assay 费用后的你的份额，以及所需质押。质押担保失败率承诺，与收益分开。

<figure><img src="https://2968587239-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEVw4IWiK1TgVNFeMYjWm%2Fuploads%2Fgit-blob-ef98aafcce68c0f1dd147683f3558ccdbf449b89%2Flist-a-catalogue-tool-9.png?alt=media" alt="Go live 定价，已选择 Free + paid，每日免费额度为 100 次，已标出 Price per call"><figcaption><p>设置价格和每个智能体的每日免费额度。</p></figcaption></figure>
{% endstep %}

{% step %}

### 发布上架项

检查发布要求。如果按钮要求添加质押，请打开它，按提示连接并验证业务的质押钱包，再按 USDG 授权和质押交易提示操作。你需要 USDG，以及用于网络手续费的 ETH。批准前核对金额；质押确认后，此流程会发布上架项。

如果已满足要求，选择 **Publish**。上线后客户即可调用。免费上架无需质押即可发布。需要质押时，最后一步需要钱包。
{% endstep %}
{% endstepper %}

## 确认是否成功

上架项的 **Overview** 显示 **Live**。核对工具名称和价格。之后可以从 **Listings** 返回，查看设置、质量和调用。

<figure><img src="https://2968587239-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEVw4IWiK1TgVNFeMYjWm%2Fuploads%2Fgit-blob-92ef303b3511c222acba5362e28b29824e541984%2Flist-a-catalogue-tool-10.png?alt=media" alt="天气上架项的 Overview，显示 Live 状态和上架时间线"><figcaption><p>已上线的上架项可供智能体调用。</p></figcaption></figure>

## 遇到问题时

| 你看到的情况                                         | 处理方式                           |
| ---------------------------------------------- | ------------------------------ |
| 显示 **Open your listing**，而不是 **Use this tool** | 你已经提供此工具。继续操作现有上架项。            |
| 测试停在 **Your API answered**                     | 检查地址、可用性和身份验证：已保存的请求头，或你的签名检查。 |
| 测试停在 **Output mapped** 或 **Checks**            | 将响应与工具所需答案比较。发布前修复 API 或连接。    |
| 测试已过时                                          | 保存连接变更后重新运行测试。                 |
| 发布要求结算付款钱包或质押                                  | 发布前完成钱包步骤，并满足显示的金额要求。          |

## 进一步了解

* 开发者（可选）：[API 密钥或签名](https://docs.goassay.ai/developers/zh/list-your-api/api-key-or-signature)。
* 开发者（可选）：[用 Cloudflare Worker 验证](https://docs.goassay.ai/developers/zh/list-your-api/cloudflare-worker)。
* 开发者（可选）：[在代码中验证](https://docs.goassay.ai/developers/zh/list-your-api/verify-in-your-code)。

## 下一步

* [获取收益](/list-your-api/zh/ru-men/get-paid.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.goassay.ai/list-your-api/zh/ru-men/list-a-catalogue-tool.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
