API Documentation
REST endpoints for the website-to-skill generator. Turn any public site into an agent skill package with one request. Built for humans and for agents that need a machine-readable skill source.
Base URL
https://dariocositore.com/api/
All endpoints return JSON except the generate endpoint, which returns a ZIP archive. CORS is enabled for browser clients. Send Content-Type: application/json on POST requests.
Authentication
GET /api/health is public: it is the deploy check. POST /api/lead is public by design, the site newsletter form posts to it from the browser. The JSON body must carry email and consent: true, plus an optional notes string naming the form (kept as the contact's source property); without consent the server answers 400 Consent required. Resend is the only mailing list behind it: a fresh signup answers 200 with {status:"ok", contact, event}, where event is the user.created emission the welcome cycle listens for, a return visit answers {status:"already", …} without re-emitting, and a rejected request answers error (wording safe to show a visitor) alongside detail (the raw upstream text, for us). POST /api/generate expects a bearer token:
Authorization: Bearer <token>
Missing or wrong credentials return 401 Unauthorized with a WWW-Authenticate header pointing at the OAuth protected resource metadata. When the server has no token configured it returns 500 with Server missing API_TOKEN.
Endpoints
GET /api/health
Service health check. Returns status and version.
curl https://dariocositore.com/api/health
{
"status": "ok",
"version": "1.0.0"
}
POST /api/generate
Crawls a public website and returns a ZIP containing a Hermes skill, an OpenClaw package, or both. The crawl stays on the same domain and skips non-HTML assets and noindex pages.
Request body
| Field | Type | Default | Description |
|---|---|---|---|
url | string | required | Starting URL to crawl. Must be a public HTTP(S) address. |
format | string | hermes+openclaw | Output package. Use hermes, openclaw, or hermes+openclaw. |
depth | integer | 2 | Maximum link depth from the start URL. |
pages | integer | 20 | Maximum number of pages to crawl. |
Example
curl -X POST https://dariocositore.com/api/generate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $API_TOKEN" \
-d '{"url":"https://example.com","format":"hermes+openclaw","depth":2,"pages":20}' \
-o skill.zip
Response
On success: 200 OK with Content-Type: application/zip. The archive includes SKILL.md, a site map, raw page extracts, and OpenClaw package files depending on the requested format.
On failure: JSON error body with a error field. Crawl problems are listed in crawl_errors.
{
"error": "No pages crawled",
"crawl_errors": ["HTTP 404 on https://example.com/missing"]
}
Agent Discovery
Machine-readable metadata lives under /.well-known/. Agents and automation tools can read these without scraping HTML.
| Path | Content type | Purpose |
|---|---|---|
/.well-known/agent-card.json | JSON | Agent capabilities and supported interfaces. |
/.well-known/agent-skills/index.json | JSON | Published agent skills catalog. |
/.well-known/api-catalog | linkset+json | API catalog for service discovery. |
/.well-known/mcp/server-card.json | JSON | MCP server card. |
/.well-known/openid-configuration | JSON | OpenID issuer metadata. |
/.well-known/oauth-protected-resource | JSON | OAuth protected resource metadata. |
/index.md | text/markdown | Markdown alternate of the homepage for LLM crawlers. |
/llms.txt | text/plain | Site map written for language models. |
Workflow Repair Intake
The diagnostics form on this site submits broken workflows to a dedicated triage service:
POST https://elitza-triage.dariozzxx.workers.dev/api/triage
POST https://elitza-triage.dariozzxx.workers.dev/api/complete
Both endpoints accept a JSON payload and a Cloudflare Turnstile token. Use the free diagnostic instead of calling these directly unless you are building an integration.
Errors
| Status | Meaning |
|---|---|
400 | Missing or invalid request body. |
401 | Missing bearer token on a protected endpoint. |
405 | Wrong HTTP method. |
404 | Unknown endpoint. |
502 | Crawl started but no usable pages were collected. |
500 | Internal error during generation. |
Stay in the loop.
Technical breakdowns, new system builds, and lessons from deploying autonomous AI. One email a week, direct to your inbox.
Weekly architectural updates. Unsubscribe anytime.