Integrate Speakeasy With Mintlify


Overview

Auto-generated code snippets from Speakeasy SDKs can be integrated directly into Mintlify API reference documentation. SDK usage snippets are shown in the interactive playground (opens in a new tab) of Mintlify-powered documentation sites.

Setting up the Integration

Prerequisites

Warning Icon

IMPORTANT

Before continuing with this guide, ensure that the following prerequisites have been met:


Once those requirements have been met, proceed with the following steps.

Locate & Copy the Combined Spec URL

First, navigate to the Speakeasy Dashboard (opens in a new tab) and open the API Registry tab. Once there, open the *-with-code-samples entry for the desired API.

NOTE: If this entry is not labeled with Combined Spec, ensure that the API has an Automatic Code Sample URL configured.

From the registry entry’s page, copy the provided public URL.

Update Mintlify config, aka mint.json

OpenAPI specifications can be added to Anchors, or Tabs in the mint.json file of a Mintlify repository. Anchors are displayed as a list of links on the left side of the documentation, while Tabs are displayed as tabs on the top of the documentation.

To add an OpenAPI specification to Anchors, update the anhchor field in mint.json file with:

mint.json
{
"anchors": [
{
"name": "API Reference",
"openapi": "SPEAKEASY_COMBINED_SPEC_URL",
"url": "api-reference",
"icon": "square-terminal"
}
]
}

To add an OpenAPI specification to Tabs, update the tab field in mint.json file with:

mint.json
{
"tabs": [
{
"name": "API Reference",
"url": "api-reference",
"openapi": "SPEAKEASY_COMBINED_SPEC_URL"
}
]
}

Mintlify offers useful customizations for API references generated from OpenAPI specifications. For more information on, refer to the Mintlify documentation (opens in a new tab).

What Next?

After completing the steps above, code snippets generated by Speakeasy can be viewed in the Mintlify API reference documentation. To see the code snippets in action, navigate to the interactive playground (opens in a new tab) of the Mintlify-powered documentation site.