Zyla API Hub 技能:将 10,000+ API 连接到 Openclaw 技能

作者:互联网

2026-04-13

AI快讯

什么是 Zyla API Hub 技能?

Zyla API Hub 技能将您的 AI 编码代理从静态助手转变为能够与全球数据源交互的高效操作员。通过将此技能集成到您的 Openclaw 技能集合中,您可以即时访问包含 10,000 多个 API 的庞大生态系统,涵盖从金融市场和天气预报到电子邮件验证和翻译服务的所有领域。

该技能通过提供统一的身份验证方法和标准化界面,简化了管理多个 API 提供商的复杂性。它允许代理动态搜索工具、执行调用并处理实时信息,无需担心供应商锁定,并采用灵活的按需付费模式,确保您仅为您代理实际使用的部分付费。

下载入口:https://github.com/openclaw/skills/tree/main/skills/alebrega/zyla-api-hub-skill

安装与下载

1. ClawHub CLI

从源直接安装技能的最快方式。

npx clawhub@latest install zyla-api-hub-skill

2. 手动安装

将技能文件夹复制到以下位置之一

全局模式 ~/.openclaw/skills/ 工作区 /skills/

优先级:工作区 > 本地 > 内置

3. 提示词安装

将此提示词复制到 OpenClaw 即可自动安装。

请帮我使用 Clawhub 安装 zyla-api-hub-skill。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。

Zyla API Hub 技能 应用场景

  • 获取特定位置或邮政编码的实时天气、温度和气候预测。
  • 将货币转换和实时外汇数据集成到财务工作流程中。
  • 在开发或潜在客户生成过程中自动执行电子邮件验证和数据清洗流程。
  • 搜索广泛的 Zyla 目录,为独特的编码需求寻找利基 API 解决方案。
  • 使用来自地理位置、旅游或新闻终端的实时数据丰富代理响应。
Zyla API Hub 技能 工作原理
  1. AI 代理识别出需要外部数据或特定 API 服务的用户需求。
  2. 代理使用集成的目录脚本在 Zyla Hub 中搜索最相关的 API ID 和端点 ID。
  3. 使用 Openclaw 技能辅助脚本制定请求,传递必要的参数和 Zyla API 密钥。
  4. 中心将请求路由到上游服务提供商,并将结构化的 JSON 响应返回给代理。
  5. 代理解析响应数据以完成用户任务或告知其逻辑中的下一步。

Zyla API Hub 技能 配置指南

要在您的 Openclaw 技能环境中启用此功能,请按照以下设置步骤操作:

  1. 访问 https://zylalabs.com/openclaw/connect 生成您的唯一 API 密钥。
  2. 将密钥添加到位于 ~/.openclaw/openclaw.json 的配置文件中:
# 添加密钥的结构
{
  "skills": {
    "entries": {
      "zyla-api-hub-skill": {
        "apiKey": "YOUR_ZYLA_API_KEY"
      }
    }
  }
}
  1. 或者,您可以运行以下命令启动自动连接:
/zyla connect

Zyla API Hub 技能 数据架构与分类体系

该技能通过结构化的 ID 和参数分类管理数据,以确保在数千个不同服务中可靠执行。

属性 类型 描述
api_id 数字 特定 API 产品的唯一标识符。
endpoint_id 数字 要调用的特定功能端点。
params 对象 包含端点所需输入的键值对。

此外,Openclaw 技能生态系统内的所有请求都会返回标准化标头以跟踪使用情况和限制:

  • X-Zyla-RateLimit-Minute-Remaining: 当前请求容量的实时跟踪。
  • X-Zyla-API-Calls-Monthly-Used: 当前计费周期内的累计调用总数。
name: zyla-api-hub-skill
description: Zyla API Hub Skill — Turn your OpenClaw AI agent into a real-world operator. Power it with 10,000+ production-ready APIs from Zyla API Hub — instant access to weather, finance, translation, email validation, geolocation, and more.
metadata: {"openclaw":{"requires":{},"primaryEnv":"ZYLA_API_KEY","homepage":"https://zylalabs.com/openclaw/connect"}}

Zyla API Hub Skill

Turn your OpenClaw AI agent into a real-world operator. Power it with 10,000+ production-ready APIs from Zyla API Hub — instant access to weather, finance, translation, email validation, geolocation, and more, all through one unified API key, pay-as-you-go pricing, and zero vendor lock-in.

Setup

If ZYLA_API_KEY is not configured, guide the user:

  1. Visit https://zylalabs.com/openclaw/connect to get an API key
  2. Or run /zyla connect if the plugin is installed (opens browser automatically)
  3. Add the key to ~/.openclaw/openclaw.json under skills.entries.zyla-api-hub-skill.apiKey

Never ask the user to paste their API key in chat. Ask them to set it via the config and confirm when ready.

Use these directly without searching the catalog. Each includes the API ID, endpoint details, and parameters.

Weather by Zip API (ID: 781)

  • Use when: user asks about weather, temperature, forecast, climate, conditions by zip code
  • Category: Weather & Environment
  • Call: npx tsx {baseDir}/scripts/zyla-api.ts call --api 781 --endpoint --params '{"zip":"10001"}'

Currency Conversion API (example)

  • Use when: user asks about currency exchange, conversion rates, forex
  • Category: Finance
  • Call: npx tsx {baseDir}/scripts/zyla-api.ts call --api --endpoint --params '{"from":"USD","to":"EUR","amount":"100"}'

Email Validation API (example)

  • Use when: user asks to validate, verify, or check an email address
  • Category: Data Validation
  • Call: npx tsx {baseDir}/scripts/zyla-api.ts call --api --endpoint --params '{"email":"test@example.com"}'

Note: Run npx tsx {baseDir}/scripts/generate-popular.ts to regenerate this section with real API IDs and endpoints from the live catalog.

Discovering APIs

For APIs not listed above, search the catalog:

# Search by keyword
npx tsx {baseDir}/scripts/zyla-catalog.ts search "recipe"

# List APIs by category
npx tsx {baseDir}/scripts/zyla-catalog.ts list --category "Finance"

# Get endpoints for a specific API
npx tsx {baseDir}/scripts/zyla-catalog.ts endpoints --api 781

Calling APIs

# Basic call
npx tsx {baseDir}/scripts/zyla-api.ts call r
  --api  r
  --endpoint  r
  --params '{"key":"value"}'

# Specify HTTP method (default: GET)
npx tsx {baseDir}/scripts/zyla-api.ts call r
  --api  r
  --endpoint  r
  --method POST r
  --params '{"key":"value"}'

# Get info about an API
npx tsx {baseDir}/scripts/zyla-api.ts info --api 

# Check health and remaining quota
npx tsx {baseDir}/scripts/zyla-api.ts health

Using curl (fallback)

curl -H "Authorization: Bearer $ZYLA_API_KEY" r
  "https://zylalabs.com/api/{api_id}/{api_slug}/{endpoint_id}/{endpoint_slug}?param=value"

URL pattern: https://zylalabs.com/api/{api_id}/{api_name_slug}/{endpoint_id}/{endpoint_name_slug}

  • api_id and endpoint_id are numeric IDs (these do the actual routing)
  • api_name_slug and endpoint_name_slug are URL-friendly names (for readability)

Error Handling

  • 401 Unauthorized: API key is invalid or expired. Ask the user to run /zyla connect or visit https://zylalabs.com/openclaw/connect to get a new key.
  • 403 Forbidden: Subscription issue. The pay-as-you-go plan should handle this automatically. If it persists, ask the user to contact support.
  • 429 Too Many Requests: Rate limit exceeded. Check the X-Zyla-RateLimit-Minute-Remaining response header. Wait before retrying.
  • 404 Not Found: The API or endpoint does not exist. Verify the IDs using the catalog.
  • 5xx Server Error: Upstream API issue. Retry after a short delay (2-5 seconds).

Rate Limit Headers

Every API response includes these headers:

  • X-Zyla-RateLimit-Minute-Limit: Max requests per minute
  • X-Zyla-RateLimit-Minute-Remaining: Remaining requests this minute
  • X-Zyla-API-Calls-Monthly-Used: Total calls this billing cycle
  • X-Zyla-API-Calls-Monthly-Remaining: Remaining calls this cycle

Billing

  • Pay-as-you-go: No monthly fee. Each API call is billed at the API's per-call rate.
  • Billing happens at the end of each cycle via Stripe.
  • Use the health endpoint to check current usage: npx tsx {baseDir}/scripts/zyla-api.ts health

相关推荐