Zyla API Hub Skill
Scanned@alebrega
npx machina-cli add skill @alebrega/zyla-api-hub-skill --openclawZyla 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:
- Visit https://zylalabs.com/openclaw/connect to get an API key
- Or run
/zyla connectif the plugin is installed (opens browser automatically) - Add the key to
~/.openclaw/openclaw.jsonunderskills.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.
Quick Start — Popular APIs
Use these directly without searching the catalog. Each includes the API ID, endpoint details, and parameters.
<!-- POPULAR_APIS_START --> <!-- This section is auto-generated by: npx tsx scripts/generate-popular.ts --> <!-- Run before publishing to update with the latest top 20 APIs by popularity -->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 <endpoint_id> --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 <id> --endpoint <endpoint_id> --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 <id> --endpoint <endpoint_id> --params '{"email":"test@example.com"}'
<!-- POPULAR_APIS_END -->Note: Run
npx tsx {baseDir}/scripts/generate-popular.tsto 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
Using the helper script (recommended)
# Basic call
npx tsx {baseDir}/scripts/zyla-api.ts call \
--api <api_id> \
--endpoint <endpoint_id> \
--params '{"key":"value"}'
# Specify HTTP method (default: GET)
npx tsx {baseDir}/scripts/zyla-api.ts call \
--api <api_id> \
--endpoint <endpoint_id> \
--method POST \
--params '{"key":"value"}'
# Get info about an API
npx tsx {baseDir}/scripts/zyla-api.ts info --api <api_id>
# Check health and remaining quota
npx tsx {baseDir}/scripts/zyla-api.ts health
Using curl (fallback)
curl -H "Authorization: Bearer $ZYLA_API_KEY" \
"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_idandendpoint_idare numeric IDs (these do the actual routing)api_name_slugandendpoint_name_slugare URL-friendly names (for readability)
Error Handling
- 401 Unauthorized: API key is invalid or expired. Ask the user to run
/zyla connector 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-Remainingresponse 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 minuteX-Zyla-RateLimit-Minute-Remaining: Remaining requests this minuteX-Zyla-API-Calls-Monthly-Used: Total calls this billing cycleX-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
Overview
You can extend your OpenClaw AI agent with thousands of production-ready APIs from Zyla API Hub. With the Zyla API Hub Skill, you gain instant access to weather, finance, translation, email validation, geolocation, and more—through one unified API key, pay-as-you-go pricing, and zero vendor lock-in. The setup is designed to be secure and developer-friendly, keeping your credentials in your OpenClaw config and eliminating the need to paste keys in chat.
How This Skill Works
You configure your ZYLA_API_KEY in your OpenClaw environment (see the setup steps) and then you can call any Zyla API through the helper scripts. The skill exposes an API catalog you can search and browse, and you call endpoints using the zyla-api.ts helper. Popular APIs are surfaced in the Quick Start for fast wins, while you can discover additional APIs via the catalog commands. If your key becomes invalid, you’ll be prompted to re-authenticate via the connect flow. You never paste keys in chat; you store them securely in ~/.openclaw/openclaw.json under skills.entries. Example calls use the API and endpoint IDs with a JSON parameter payload. All calls are billed on a pay-as-you-go basis with Stripe, and you can monitor usage via the health endpoint and standard response headers. Typical URL patterns and curl templates are provided for fallback usage, and you can fetch endpoint details or API health to stay informed about quotas and status.
When to Use It
- You need real-time weather, temperature, or forecast data by location.
- You require currency conversion or forex rates for pricing, budgeting, or financial planning.
- You need to validate, verify, or check the format of an email before onboarding a user.
- You want to translate text or perform language-related tasks across multiple languages.
- You need accurate geolocation, IP-to-location, or place lookup for user experiences.
- You want to access a wide range of APIs without vendor lock-in and without managing multiple keys.
Quick Start
- Setup your API key: Visit https://zylalabs.com/openclaw/connect to obtain your key or run /zyla connect if the plugin is installed (opens browser automatically). Then add the key to ~/.openclaw/openclaw.json under skills.entries.zyla-api-hub-skill.apiKey.
- Test a popular API quickly (Weather by Zip API example): npx tsx {baseDir}/scripts/zyla-api.ts call --api 781 --endpoint <endpoint_id> --params '{"zip":"10001"}'
- Try a currency conversion example: npx tsx {baseDir}/scripts/zyla-api.ts call --api <id> --endpoint <endpoint_id> --params '{"from":"USD","to":"EUR","amount":"100"}'
- Validate an email: npx tsx {baseDir}/scripts/zyla-api.ts call --api <id> --endpoint <endpoint_id> --params '{"email":"test@example.com"}'
- Discover more APIs: npx tsx {baseDir}/scripts/zyla-catalog.ts search "weather" or npx tsx {baseDir}/scripts/zyla-catalog.ts list --category "Finance"
Best Practices
- Never paste your API key in chat; always configure it via the OpenClaw config and confirm when ready.
- Use the health endpoint to monitor quotas and status before heavy usage.
- Handle errors gracefully by mapping 401/403/429 responses to user-friendly messages.
- Respect rate limits by inspecting the response headers (e.g., X-Zyla-RateLimit-Minute-Remaining).
- Cache frequent API responses when appropriate to reduce latency and costs.
- Prefer the catalog IDs (API ID and endpoint_id) over human-friendly slugs to avoid ambiguity.
Example Use Cases
- Weather by Zip: You ask for current conditions in a specific zip code and use the returned temperature and forecast to decide whether to proceed with outdoor plans.
- Currency conversion: You convert amounts between currencies to estimate costs in multi-celler workflows or international pricing.
- Email validation: You validate a user email before sending onboarding messages to reduce bounce rates and improve deliverability.
- Translation: You translate or detect language for user-provided content to tailor responses to the user’s locale.
- Geolocation: You infer city or country from user coordinates or IP for geo-targeted responses or regional compliance.