Everything on pavlo.sh is available to programs and AI agents as well as people. No API key or sign-up is needed.
Machine-readable entry points
- llms.txt: site summary, when to use this site, and links to every page.
- OpenAPI spec: OpenAPI 3.1 description of the public API.
- API catalog: RFC 9727 linkset pointing at the spec and these docs.
- Sitemap and RSS feed.
Public API
Base URL: https://pavlo.sh/api. All responses are JSON.
GET /api: list endpoints.GET /api/posts: list every article (slug, title, summary, date, URLs).GET /api/posts/{slug}: one article, including its full markdown body.POST /api/tokenizer: count cl100k_base tokens. Send{"text": "..."}.GET /api/tokenizer?text=...: the same, for short text.
Example:
curl -s https://pavlo.sh/api/tokenizer -H 'Content-Type: application/json' -d '{"text":"Hello, agents"}'Errors
Errors use HTTP status codes and a JSON body with a stable code, a message, and a hint on how to fix the request:
{"error":{"status":404,"code":"post_not_found","message":"...","hint":"...","docs":"https://pavlo.sh/developers"}}Markdown versions of pages
Every page has a markdown version. Request it with an Accept: text/markdown header, or add .md to the URL (/index.md for the home page):
curl -H 'Accept: text/markdown' https://pavlo.sh/blog/why-tokens-matterUnknown URLs return a real 404 status with a short markdown body that links to the sitemap and llms.txt.
Usage
The API is free and has no authentication. Please keep request rates reasonable and cache responses where you can. Questions or problems: ciao@pavlo.sh.