ClawHub API v1 Overview and Conventions
This page describes the public REST API v1 for ClawHub, including base URL, authentication, rate limits, and guidelines for building catalogs or search interfaces. It is intended for developers who want to reuse public skill data.
Read this when
- Building API clients
- Adding endpoints or schemas
API v1
Base: https://clawhub.ai
OpenAPI: /api/v1/openapi.json
Public catalog reuse
ClawHub's public read APIs let you construct your own catalog, directory, or search interface. Skill metadata and files that are publicly accessible fall under ClawHub's skill license terms, and the API carries rate limits, so consumption should stay reasonable.
Guidelines:
- For catalog listings, rely on public read endpoints like
GET /api/v1/skills,GET /api/v1/search, andGET /api/v1/skills/{slug}. - Cache what you fetch and honor
429,Retry-After, and the rate-limit headers rather than polling frequently. - When you show listings, point back to the canonical ClawHub skill URL so users can check the original registry entry.
- Canonical page URLs should follow the pattern
https://clawhub.ai/<owner>/skills/<slug>. - Never suggest that ClawHub endorses, verifies, or runs the third-party site.
- Do not expose hidden, private, or moderation-blocked content by working around public API filters or authentication boundaries.
Auth
- Public read: no token needed.
- Write and account operations:
Authorization: Bearer clh_....
Rate limits
Enforcement tied to authentication:
-
Anonymous requests: limited per IP.
-
Authenticated requests (valid Bearer token): limited per user bucket.
-
A missing or invalid token reverts to IP-based limits.
-
Read: 3000/min per IP, 12000/min per key
-
Write: 300/min per IP, 3000/min per key
-
Download: 1200/min per IP, 6000/min per key
Headers: X-RateLimit-Limit, X-RateLimit-Reset, RateLimit-Limit, RateLimit-Reset;
X-RateLimit-Remaining, RateLimit-Remaining, and Retry-After appear on 429.
Meaning:
X-RateLimit-Reset: Unix epoch seconds, the absolute reset timeRateLimit-Reset: seconds to wait before the limit resetsX-RateLimit-Remaining/RateLimit-Remaining: the precise remaining quota when included; sharded successful calls leave it out instead of providing an approximate global figureRetry-After: seconds to pause before retrying on429
Sample 429:
HTTP/2 429
x-ratelimit-limit: 20
x-ratelimit-remaining: 0
x-ratelimit-reset: 1771404540
ratelimit-limit: 20
ratelimit-remaining: 0
ratelimit-reset: 34
retry-after: 34
How clients should behave:
- When
Retry-Afteris available, use it first. - Otherwise fall back to
RateLimit-Resetor calculate the wait fromX-RateLimit-Reset. - Introduce jitter into retry attempts.
Errors
- v1 errors come back as plain text (
text/plain; charset=utf-8), covering400,401,403,404,429, and blocked-download responses. - Unknown query parameters are ignored to preserve compatibility.
- Known query parameters carrying invalid values trigger
400.
Endpoints
Public read:
GET /api/v1/search?q=...- You can optionally narrow results with
highlightedOnly=trueornonSuspiciousOnly=true. - For deterministic matches on the exact slug, set mode to
mode=exact. - Supplying an invalid
modevalue triggers400 Invalid search modeas the response. nonSuspicious=trueserves as the legacy name for this endpoint.
- You can optionally narrow results with
GET /api/v1/skills?limit=&cursor=&sort=sortacceptsupdatedas its default, along withrecommended(which maps todefault),createdAt(mapped tonewest),downloads,stars(corresponding torating), andname; the older install aliasesinstallsCurrent,installs, andinstallsAllTimeall resolve todownloadsandtrending.- With
prefix, listing is deterministic, ordered by ascending slug prefix; pick up where you left off usingnextCursor. - An invalid
sortvalue yields400in the response. - When sorting is anything other than
trending, thecursorparameter takes effect. nonSuspiciousOnly=trueis available as an optional filter.- The legacy alias here is
nonSuspicious=true. - If
nonSuspiciousOnly=trueis enabled, cursor-based pages might return fewer thanlimitentries; keep going withnextCursor. - Signals for engagement and recency drive the behavior of
recommended.
GET /api/v1/skills/{slug}GET /api/v1/skills/{slug}/moderationGET /api/v1/skills/{slug}/versions?limit=&cursor=GET /api/v1/skills/{slug}/versions/{version}GET /api/v1/skills/{slug}/scan?version=&tag=GET /api/v1/skills/{slug}/file?path=&version=&tag=GET /api/v1/resolve?slug=&hash=GET /api/v1/download?slug=&version=&tag=- For hosted skills, the ZIP bytes returned are deterministic.
- If a GitHub-backed skill is current and has a
cleanorsuspiciousscan, the response is a JSONpublic-githubhandoff descriptor rather than ClawHub bytes.
GET /api/v1/skills/export?startDate=&endDate=&limit=&cursor=- Hosted skills get exported exactly as the stored files.
- When a GitHub-backed skill is current and carries a
cleanorsuspiciousscan, the export takes the form ofpublic-githubhandoff descriptors.
GET /api/v1/packages?limit=&cursor=&sort=sortsupportsupdatedas the default, plusrecommendedanddownloads, withinstallsas the legacy alias.- Passing an invalid
sortvalue results in400being returned.
GET /api/v1/plugins?limit=&cursor=&sort=sort:recommended(default),downloads,updated, legacy aliasinstallsGET /api/v1/plugins/search?q=...GET /api/v1/packages/{name}/versions/{version}/artifactGET /api/v1/packages/{name}/versions/{version}/securityGET /api/v1/packages/{name}/versions/{version}/artifact/downloadGET /api/npm/{package}GET /api/npm/{package}/-/{tarball}.tgz
Authentication is mandatory:
POST /api/v1/skills(publish, multipart preferred)DELETE /api/v1/skills/{slug}DELETE /api/v1/packages/{name}POST /api/v1/skills/{slug}/undeletePOST /api/v1/packages/{name}/undeletePOST /api/v1/skills/{slug}/renamePOST /api/v1/skills/{slug}/mergePOST /api/v1/skills/{slug}/transferPOST /api/v1/packages/{name}/transferPOST /api/v1/skills/{slug}/transfer/acceptPOST /api/v1/skills/{slug}/transfer/rejectPOST /api/v1/skills/{slug}/transfer/cancelGET /api/v1/skills/export?startDate=&endDate=&limit=&cursor=GET /api/v1/plugins/export?startDate=&endDate=&limit=&cursor=&family=GET /api/v1/transfers/incomingGET /api/v1/transfers/outgoingGET /api/v1/whoami
Restricted to administrators:
POST /api/v1/users/reservesets aside root slugs and private no-release package placeholders for an owner handle.
Legacy
The older /api/* and /api/cli/* endpoints remain accessible. Check DEPRECATIONS.md for details.