DEV Community

Solomon
Solomon

Posted on

I Built a Free Api Docs Gen — No Signup, No Subscription

I was tired of writing API docs. Every time I shipped an endpoint, I'd open a blank Markdown file, stare at it, and manually copy-paste response shapes into some template. It felt like the most mechanical part of building software — the kind of work that should be automated.

So I built Api Docs Gen and put it live.

** 👉 https://api-docs-gen.solomontools.workers.dev **

Paste any API response JSON, any code snippet, any raw HTTP payload, and it generates clean, structured API documentation with endpoint summaries, parameter tables, response schemas, and usage examples. No signup. No API key. No subscription tier. Just paste and get docs.

Here's why I built it, how it works, and what shipping it taught me.


Why I Built It

The problem isn't that API documentation doesn't exist — OpenAPI specs and Swagger UI are everywhere. The problem is the friction. Most teams either write docs after shipping (and never update them) or maintain a separate OpenAPI spec file that drifts from the actual implementation.

I wanted something that sits between "I just wrote an endpoint" and "docs exist." A tool where you paste what your API actually returns, and it produces documentation that's close to production-ready. Not perfect, but good enough to start from, and fast enough that you'd actually use it.

I also wanted to prove something to myself: can you ship a useful AI-powered tool without auth flows, without a database, without a billing system? Can you keep it stupidly simple?

That constraint — no signup, no subscription — became the entire design philosophy.


How It Works Under the Hood

The entire app runs on Cloudflare Workers at the edge. There's no server. No database. No container. When a user pastes an API response and hits "Generate," the Worker receives the payload, sends it to an AI inference API with a structured prompt, and returns the generated Markdown documentation directly to the browser.

Here's the architecture at a glance:

User Browser → Cloudflare Worker (Edge) → AI Inference API → Worker transforms response → Markdown back to browser
Enter fullscreen mode Exit fullscreen mode

The Worker does three things in sequence:

  1. Receive the raw input (JSON, code, or text)
  2. Forward it to an LLM with a carefully engineered prompt that specifies the documentation format — endpoint name, description, parameters, request/response schemas, example usage
  3. Return the Markdown output, which the frontend renders with syntax highlighting and a copy-to-clipboard button

The frontend itself is a single HTML page with vanilla JS. No framework. No build step. Everything is served as a static Worker response.

The prompt engineering is the real secret sauce. I spent a lot of iterations on the system prompt to make sure the AI outputs consistent, well-structured docs rather than freeform prose. The prompt includes examples of desired input/output pairs, so the model learns the format without needing fine-tuning.


The Prompt Engineering Piece

This is worth calling out separately because it's where most of the iteration happened. A bad prompt means the AI generates docs that are technically correct but formatted inconsistently — sometimes using bullet points for parameters, sometimes tables, sometimes just prose.

I settled on a prompt structure that forces a specific schema:

  • ## Endpoint
  • ### Description
  • ### Parameters (table)
  • ### Request Body (schema)
  • ### Response (schema + example)
  • ### Example Usage (curl snippet)

The AI is instructed to fill in every section, even if some sections are "N/A." This consistency is what makes the output actually useful — you can drop it straight into a README and it looks intentional.


What I Learned Shipping It

Shipping without auth is liberating and terrifying. Liberating because deployment is literally one wrangler deploy command. Terrifying because anyone can abuse it — and they will. I set rate limits at the Worker level (10 requests per minute per IP), and so far the abuse has been minimal. If it becomes a problem, I'll add a Cloudflare Turnstile challenge, but for now the simplicity is worth more than perfect protection.

The edge is the right place for this. Because the Worker is geographically distributed, the latency from input to generated docs is sub-second in most regions. That speed matters — if the tool takes more than 2 seconds, developers close the tab and go back to writing docs manually.

Free tools attract attention fast. Within the first week, I had a few hundred unique visitors and a handful of GitHub stars. The feedback was overwhelmingly positive, but the most useful comments pointed out edge cases: "What if I paste a GraphQL response?" and "Can it handle array-of-objects responses?" Those are on the roadmap.

You don't need a roadmap document. You need a list of 10 things users asked for, and you ship the three easiest ones first.


Monetization (Honest Version)

Api Docs Gen is free to use. No paywall, no feature gating, no "premium tier" that locks basic functionality behind a credit card.

If you use it and it saves you time, you can support the project via a one-time $5 contribution on the landing page. That's it. No monthly billing, no hidden fees, no email required to pay. Just a one-time thing if it was useful to you.

I don't expect it to fund a company. I built this to solve my own problem, prove a concept, and maybe help a few other developers save a few hours per month. If the $5 contributions cover the Cloudflare Workers execution costs, that's a win.


What's Next

  • Support for GraphQL schemas and OpenAPI specs as input, not just raw JSON responses
  • A "compare" mode that highlights differences between two versions of the same endpoint's response
  • Export to multiple formats: Markdown, HTML, and reStructuredText
  • A CLI tool so you can generate docs from CI pipelines without opening a browser

The project is open source. If any of this resonates with you, fork it, improve it, or just use it as-is. The link is at the top of this post.

Thanks for reading. Now go document your APIs — or at least let a machine do the first draft.


Enjoyed this? I build simple, powerful AI tools — try the free Text Summarizer or browse the full toolkit at Solomon Tools. No signup, no subscription.

Top comments (0)