> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hermai.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> 注册、获取 API key,并在两分钟内运行第一次 hosted fetch。

## 1. 注册

前往 [hermai.ai/register](https://hermai.ai/register) 创建免费账号。Registry 可以免费浏览。

## 2. 创建 API key

进入 **Dashboard > API Keys** 并创建新的 key。创建后复制一次。需要验证的请求会用到。

```
hm_sk_abc123...
```

部分 registry 浏览请求可以匿名使用,但 hosted fetch 需要 API key。

## 3. 运行 hosted fetch

通过 Hermai 调用一个已注册端点:

```bash theme={null}
export HERMAI_API_KEY="hm_sk_abc123..."

curl -sS -X POST "https://api.hermai.ai/v1/fetch" \
  -H "Authorization: Bearer ${HERMAI_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "site": "semanticscholar.org",
    "endpoint": "get_paper",
    "params": {
      "paper_id": "ARXIV:1706.03762",
      "fields": "paperId,externalIds,title,authors,venue,year,referenceCount,citationCount,openAccessPdf"
    }
  }'
```

响应:

```json theme={null}
{
  "success": true,
  "data": {
    "paperId": "204e3073870fae3d05bcbc2f6a8e263d9b72e776",
    "title": "Attention is All you Need",
    "year": 2017
  },
  "meta": {
    "site": "semanticscholar.org",
    "endpoint": "get_paper",
    "method": "GET",
    "source": "gateway",
    "latency_ms": 1234,
    "credits_used": 1,
    "credits_remaining": 999,
    "cached": false
  }
}
```

## 4. 浏览可用 schema

在 [hermai.ai/schemas](https://hermai.ai/schemas) 浏览,或通过 API:

```bash theme={null}
# 列出所有 schema
curl "https://api.hermai.ai/v1/schemas"

# 获取一个公开 schema 卡片
curl "https://api.hermai.ai/v1/schemas/semanticscholar.org"
```

公开 schema 卡片会显示站点、描述、端点名称、method、purpose,以及面向用户的 readiness 信号。

## 5. 拉取 package 或自行执行

如果希望自己的 agent 或服务器直接执行请求,可以带 intent 拉取 catalog 或完整 package:

```bash theme={null}
curl -H "Authorization: Bearer ${HERMAI_API_KEY}" \
     -H "X-Hermai-Intent: looking up product endpoints on allbirds.com to build a price comparison agent" \
     "https://api.hermai.ai/v1/catalog/allbirds.com"

curl -H "Authorization: Bearer ${HERMAI_API_KEY}" \
     -H "X-Hermai-Intent: downloading Semantic Scholar metadata routes for citation enrichment" \
     "https://api.hermai.ai/v1/schemas/semanticscholar.org/package"
```

Catalog 和 package 路由会返回端点 recipe。`POST /v1/fetch` 会通过 Hermai 执行已注册端点。

## 6. 贡献 schema

发现缺失的网站?用 CLI 记录其端点并推送 schema:

```bash theme={null}
# 安装 CLI
go install github.com/hermai-ai/hermai-cli/cmd/hermai@latest

# 分类网站并找到公开路径
hermai detect https://example.com
hermai wellknown example.com

# 从详情页面提取嵌入数据
hermai probe --body https://example.com/products/123 | hermai extract

# 捕获动态页面的 XHR 流量(搜索、购物车等)
hermai intercept https://example.com/search?q=test

# 编写 schema.json(参见 /zh-Hans/concepts/schemas),然后推送
hermai registry push schema.json
```

<Tip>
  **使用 Claude Code、Codex 或 Cursor?** 运行 `npx skills add hermai-ai/hermai-skills`,你的 agent 就会代替你完成发现与推送。详情见 [hermai-skills repo](https://github.com/hermai-ai/hermai-skills)。
</Tip>

每贡献一个网站可获得 **+50 credits**。Credits 会显示在 dashboard 中,并可在支持 hosted execution 的地方使用。

## 下一步

* [Hermai 如何运作](/zh-Hans/concepts/how-hermai-works): 运行模型
* [Hosted fetch](/zh-Hans/concepts/hosted-fetch): 通过 Hermai 运行已注册端点
* [Schemas](/zh-Hans/concepts/schemas): 格式、认证、贡献方式
* [Catalog](/zh-Hans/concepts/catalog): 查询 API 详情
* [API keys](/zh-Hans/concepts/api-keys): 范围与速率限制
