InsightWorker Logo

API Documentation Generator

Scan a GitHub repo (or paste code) and generate Word + Markdown API reference docs — routes, parameters, models, and descriptions.

← All use cases
Code & Repo Hygiene
Backend teams, platform teams, and engineers who need accurate API docs from source code
FastAPIFlaskMarkdownWordstatic analysis

The problem

  • API docs drift quickly — code changes, endpoints move, request/response models evolve, and documentation becomes stale.
  • Teams waste time doing “doc archaeology” when integrating with services — reading route files and guessing payloads.
  • Even when docstrings exist, they aren’t structured into a consistent endpoint reference.
  • Manual doc writing is expensive — the work is repetitive and easy to forget during releases.

How InsightWorker handles it

1
Ingest inputs — API title/version/base URL + repo URL (clone) or pasted code snippet. git clone · input validation
2
Scan & extract routes — detect FastAPI/Flask decorators and collect methods/paths and docstrings. route extraction · framework detection
3
Parse models & schemas — extract Pydantic BaseModel / dataclass field definitions (optional). type hints · request/response models
4
Generate API reference — endpoint-by-endpoint documentation (params, body, response, examples). structured markdown generation
5
Export artifacts — Word doc + Markdown file saved to the run folder; optional email delivery. doc export · downloads

Sample prompt

"Scan this FastAPI repo and generate a full API reference in Markdown and Word. Include endpoints, request/response models, and descriptions inferred from docstrings and type hints."
Deliverables: inputs_summary.md · routes_discovered.md · models_reference.md · api_reference.md · api_reference.docx · (optional email status)

Screenshots

API Doc Generator Inputs

Provide repo URL or paste code, choose framework, and set API metadata.

Route Scan and Extraction

Scan the codebase and extract routes, methods, and docstrings.

Models and Schemas

Optional extraction of Pydantic/dataclass models into a reference appendix.

Generated API Reference

Structured endpoint reference with parameters, request/response, and descriptions.

Word and Markdown Downloads

Exported Word + Markdown artifacts ready for sharing.

Key Capabilities

  • Framework-aware scanning: FastAPI and Flask route detection plus a generic fallback mode.
  • No execution: static analysis only — safe for unknown repos.
  • Model reference: optional Pydantic/dataclass schema appendix with field types and defaults.
  • Docstring fallback: if docstrings are missing, descriptions are inferred from function and parameter names.
  • Word + Markdown export: one workflow run produces both formats for different audiences.
Prefer the browser?
Run this in InsightStudio — no CLI install for the user.

Authors publish the app once with iw app publish; business users open it in the marketplace and click Run. Your worker box does the execution.

Visit InsightStudio →

Generate API docs from source code

Keep docs current by generating structured reference pages directly from routes and models.

Download Free Trial