Add your specification
1
Add the specification to your project.
Put the specification file in your docs repository, or host it at a public HTTPS URL.
2
Reference the specification in your navigation.
Add an
openapi field to a tab, anchor, or group in your docs.json. Set it to the file’s path in your repository or the specification’s URL.docs.json
3
Preview your pages.
Run
mint dev, or open a preview deployment. Each endpoint in your specification has a page in the API reference tab, grouped by tag.$ref for internal references only, within a single OpenAPI document. Bundle multi-file specifications into one file before you add them.
Validate your specification
Runmint validate to check your specifications, pages, and navigation before you deploy.
Use a specification from a local server
During local development, you can reference a specification served by an API running on your machine:docs.json
--local-schema to let the CLI fetch the specification over HTTP:
mint validate --local-schema. Deployments require specification URLs to use HTTPS.
Keep a hosted specification in sync
If youropenapi field points to a URL, your docs rebuild only when you push to your docs repository. Changes to the specification at the URL don’t trigger a rebuild.
To update your docs when your specification changes, call the Trigger deployment endpoint from the CI job that publishes your specification. Call it after the new specification is live, so the build doesn’t fetch a partial file.
Builds fetch the URL from the public internet without credentials. If your specification is behind authentication or a private network, commit it to your docs repository instead. See Fix “Failed to load OpenAPI file” error.
To change a specification you don’t own, such as one another team publishes, use overlays.
Control access to your specification
If your site doesn’t require authentication, Mintlify serves every JSON and YAML file in your docs repository at its path on your docs domain, such ashttps://docs.example.com/openapi.json. This includes specifications that docs.json doesn’t reference. Remove specification files you don’t want public from your repository.
x-hidden and x-excluded keep endpoints out of your docs, but the specification file still contains them.
Let visitors download your spec
To add a Download API spec option to the page context menu, add"download-spec" to contextual.options in your docs.json:
docs.json
api-specs.zip. On sites with authentication, only signed-in readers can download the specification.
Enabling download-spec also publishes an RFC 9727 API catalog at /.well-known/api-catalog. The catalog links to each OpenAPI specification in your docs.json, so AI agents can find your API without crawling your docs. Without download-spec, /.well-known/api-catalog returns a 404.
Next steps
Configure the playground
Set your base URL and authentication so readers can send requests.
Organize endpoints
Group endpoints, combine specifications, and hide endpoints.
Endpoint URLs and titles
Control page URLs and keep them stable when your specification changes.
Customize endpoint pages
Change page titles, add content, and create pages for individual endpoints.