Radiant can generate API reference pages from OpenAPI sources. Use this when you want endpoint documentation, request and response details, and playground behavior to stay aligned with your API specification.
OpenAPI reference pages also improve Ask AI answers about exact methods, paths, parameters, request bodies, responses, and errors.
OpenAPI sources
OpenAPI sources can be:
- Local
.json,.yaml, or.ymlfiles inside the docs root. - Public
http://orhttps://URLs that return OpenAPI JSON or YAML.
Local OpenAPI paths are relative to the docs root and should not start with /.
Generate a full API reference
Use top-level OpenAPI navigation when the docs site is primarily an API reference:
Use an object when you need filters:
include and exclude are mutually exclusive. Use endpoint strings in the
METHOD /path format.
Add API reference to a menu
Use navigation.menu when you want guides and API reference sections side by
side.
Each menu item must contain either pages or openapi.
Add API reference to tabs
Use navigation.tabs when API reference should be a primary section above the
sidebar.
Each tab must contain one of pages, menu, or openapi. If
presentation is omitted, tabs use topbar.
Add one endpoint page
Use an OpenAPI page item when you want a specific endpoint to appear alongside
other pages in a normal pages navigation structure.
Radiant validates that the endpoint exists in the source file.
Link to generated endpoints
Use endpoint links when MDX prose should point to generated OpenAPI endpoint pages. Link to the endpoint identity, not the generated browser URL.
Use the shorthand form when exactly one rendered OpenAPI source contains the endpoint:
Markdown link destinations with spaces must be wrapped in angle brackets. The angle brackets are not part of the rendered link.
If more than one rendered OpenAPI source contains the same method and path, add the OpenAPI source before the endpoint:
Use the same source string that appears in docs.json. If the source is a
remote URL, use that URL before #GET /path.
Component href props use the same endpoint target as a quoted string:
Endpoint links are valid only when the endpoint is rendered as a page. This
means validation checks both the OpenAPI source and the docs.json navigation
that generates pages.
| Situation | Result |
|---|---|
| The endpoint is rendered by one OpenAPI source | Shorthand link works |
| The endpoint is rendered by multiple OpenAPI sources | Use the explicit source form |
The endpoint exists but is excluded or omitted from include | Validation fails |
| The endpoint exists only in an OpenAPI source that is not rendered | Validation fails |
| The endpoint does not exist in the source | Validation fails |
Do not link directly to generated endpoint URLs such as
/api-reference/customers-get. Radiant rewrites endpoint links to the correct
generated URL during the build.
Published OpenAPI output
When Radiant builds API reference pages from a local OpenAPI source, the
published docs site also exposes that spec at its public path, such as
/openapi.json or /api/openapi.json.
Generated endpoint pages also have Markdown versions. Endpoint Markdown includes the method, path, parameters, request body, responses, a link to the full spec, and a compact OpenAPI operation block with the schemas and security schemes referenced by that endpoint.
API playground proxy
The API playground can send requests through Radiant’s hosted proxy. The proxy is enabled by default.
Disable it with playground.proxy:
When the proxy is enabled, Radiant builds an allowlist from HTTPS server origins
in the OpenAPI servers list. Playground requests must target one of those
origins.
Write better API reference content
Radiant uses your OpenAPI source to render endpoint pages and prepare assistant context. Fill in:
- Operation summaries and descriptions.
- Parameter descriptions.
- Request body descriptions and schemas.
- Response descriptions and examples.
- Error responses.
- Authentication details.
The more complete your OpenAPI source is, the more useful the generated API reference and Ask AI answers become.