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

FieldTypeDefaultDescription
urlstringrequiredStarting URL to crawl. Must be a public HTTP(S) address.
formatstringhermes+openclawOutput package. Use hermes, openclaw, or hermes+openclaw.
depthinteger2Maximum link depth from the start URL.
pagesinteger20Maximum 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.

PathContent typePurpose
/.well-known/agent-card.jsonJSONAgent capabilities and supported interfaces.
/.well-known/agent-skills/index.jsonJSONPublished agent skills catalog.
/.well-known/api-cataloglinkset+jsonAPI catalog for service discovery.
/.well-known/mcp/server-card.jsonJSONMCP server card.
/.well-known/openid-configurationJSONOpenID issuer metadata.
/.well-known/oauth-protected-resourceJSONOAuth protected resource metadata.
/index.mdtext/markdownMarkdown alternate of the homepage for LLM crawlers.
/llms.txttext/plainSite 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

StatusMeaning
400Missing or invalid request body.
401Missing bearer token on a protected endpoint.
405Wrong HTTP method.
404Unknown endpoint.
502Crawl started but no usable pages were collected.
500Internal 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.