

Get started
Generate endpoint pages
Update your To generate pages for only specific endpoints, list the endpoints in the
docs.json to reference your OpenAPI specification.To automatically generate pages for all endpoints in your OpenAPI specification, add an openapi property to any navigation element.This example generates a page for each endpoint specified in openapi.json and organizes the pages in the “API reference” group.Generate all endpoint pages
pages property of the navigation element.This example generates pages for only the GET /users and POST /users endpoints. To generate other endpoint pages, add additional endpoints to the pages array.Generate specific endpoint pages
Customize your playground
Customize your API playground by defining the following properties in yourdocs.json.
Playground display
Control how the API playground appears to users with theplayground.display property:
"interactive": Display the interactive playground (default)"simple": Display a copyable endpoint with no playground"none": Display nothing"auth": Display the interactive playground only to authenticated users
The
proxy option controls whether to pass API requests through a proxy server. Defaults to true.Example code snippets
Configure the autogenerated API examples with theexamples property:
languages: Array of programming languages to show in code examples. Languages display in the order specified.defaults: Whether to show optional parameters ("all") or only required ones ("required"). Defaults to"all".prefill: Whether to prefill the API playground with data from schema examples. Defaults tofalse.autogenerate: Whether to generate code samples from API specifications. Defaults totrue.
Example configuration
This example configures the API playground to be interactive with example code snippets for cURL, Python, and JavaScript. Only required parameters are shown in the code snippets, and the playground prefills the request body with example values.Auth-based playground display
Use theauth display mode to show the interactive playground only to authenticated users. This is useful when you want to let users view your API documentation publicly while restricting playground access to logged-in users.
When display is set to auth:
- Authenticated users see the interactive playground
- Unauthenticated users see no playground (equivalent to
none)
auth with the groups property in page frontmatter to restrict playground access to specific user groups.
Page with group-restricted playground
- The page is publicly visible (anyone can view the documentation)
- Only authenticated users in the
adminordevelopergroups see the interactive playground - Users not in those groups see no playground
The
auth display mode requires authentication to be configured for your documentation.Custom endpoint pages
When you need more control over your API documentation, use thex-mint extension in your OpenAPI specification or create individual MDX pages for your endpoints.
Both options allow you to:
- Customize page metadata
- Add additional content like examples
- Control playground behavior per page
Further reading
OpenAPI setup
Learn how to create and configure your OpenAPI document
MDX setup
Create manual API reference pages with MDX files
AsyncAPI setup
Document WebSocket APIs with AsyncAPI schemas