Generate an API reference from code
Turn your codebase into a structured API reference. Falconer reads your connected repositories and generates documentation for your endpoints, functions, parameters, and return types — ready to review and publish.
Prerequisites
Section titled “Prerequisites”Connect Falconer to your codebase:
- Connect GitHub as a source.
- From the bottom-left menu in Falconer, go to Integrations and click Configure next to GitHub.
- Follow the prompts and select the repository containing your API. Wait for the initial sync to complete before generating documentation.
Generate the reference
Section titled “Generate the reference”Use the prompt box on the Falconer homepage to kick off the draft, or ask @falcon in Slack. Be specific about what you want documented:
Write an API reference for our payments serviceGenerate endpoint documentation for the routes in /api/v1Document the public methods in src/services/auth.tsFalconer reads the relevant files, infers structure from your code, and produces a draft with endpoints, parameters, request/response shapes, and descriptions.
Reference specific files
Section titled “Reference specific files”Use @ to point Falconer at the exact files or directories you want documented:
Write an API reference for @src/routes/payments.ts and @src/routes/webhooks.tsDocument the public API surface in @src/server/public-apiThis is especially useful for large codebases where you want to scope the output to a specific service or module.
Iterate on the draft
Section titled “Iterate on the draft”Once Falconer generates the draft, use the Falcon agent in the right pane or type /Falcon to refine it:
- Check completeness. Ask Falconer to verify nothing is missing:
Check @src/routes/payments.ts and make sure all parameters are documented accurately- Add examples. Request examples for each endpoint:
Add a request and response example for each endpoint- Adjust for your audience. Tell Falconer who will read it:
Rewrite this for external developers unfamiliar with our system- Publish when ready. Move the doc from your private space to the company collection.
Keep it up to date
Section titled “Keep it up to date”Once your API reference is published, Falconer monitors your connected repositories for changes. When a PR merges that affects documented endpoints, Falconer suggests doc updates for your review — so your reference stays accurate as your API evolves.