For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Slack communityLog inBook a demo
  • Getting Started
    • Overview
    • Quickstart
    • Customer Showcase
  • Writing Content
    • Markdown
    • Visual Editor
    • Reusable Markdown
    • Custom React Components
      • Generate API Reference
      • SDK Snippets
      • HTTP Snippets
      • Endpoint Errors
      • Audiences
      • Customize API Reference Layout
      • Write Markdown in API Reference
      • Generate Webhook Reference
      • Multiple Server URLs
      • Generate WebSocket Reference
      • Generate OpenRPC Reference
    • Changelog
LogoLogo
Slack communityLog inBook a demo
On this page
  • API Reference configuration options
  • Include more than one API Reference
API References

Generate your API Reference

Was this page helpful?
Previous

Display SDK snippets

Next
Built with

A key benefit of using Fern Docs is that once you’ve defined your API, you get your API Reference documentation with just one line. Add - api: API Reference to your navigation in docs.yml and Fern takes care of the rest! You’ll see your endpoints, types, and cURL snippets automatically populated from your OpenAPI Specification or Fern Definition.

Example:

docs.yml
1navigation:
2 - api: API Reference

API Reference configuration options

PropertyValue
api (required)Title of the API Reference Section
api-nameName of the API we are referencing, if there are multiple APIs
audiencesList of audiences to filter the API Reference for
display-errorsDisplays error schemas in the API References
snippetsEnable generated SDK code snippets in your API Reference
summaryRelative path to the Markdown file; the summary is displayed at the top of the API section
layoutCustomize the order that your API endpoints are displayed in the docs site
iconIcon to display next to the API section in the navigation
slugCustomize the slug for the API section (by default, the slug is generated from the API title)
skip-slugWhen true, skips the slug generation for the API section
alphabetizedWhen true, organizes all sections and endpoints in alphabetical order
flattenedDisplay all endpoints at the top level (hides the API Reference Section’s title)
paginatedDisplay all endpoints on separate pages (by default, endpoints are displayed on one single, long page)

More on customizing your API Reference here.

Include more than one API Reference

To include multiple, distinct API definitions in your documentation, you can indicate which to include using the api-name property. The api-name corresponds to the name of the folder where your API definition is housed.

docs.yml
1navigation:
2 - api: Plant Store
3 api-name: plant-api
4 - api: Garden
5 api-name: garden-api