Integrate Speakeasy with Mintlify


Autogenerated 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.

Prerequisites

To integrate Mintlify with Speakeasy, you’ll need the following:

Setting up the integration

Get the API’s combined spec public URL from the registry

Navigate to the Speakeasy Dashboard (opens in a new tab) and open the API Registry tab. Open the *-with-code-samples entry for the API.

NOTE: If the entry is not labeled Combined Spec, ensure that the API has an automatic code sample URL configured.

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

Get the API’s combined spec public URL from the registry

Add the combined spec URL 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 along the top of the documentation.

Add the combined spec URL to Anchors by updating the anchor field in the mint.json file as follows:

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

Add the combined spec URL to Tabs by updating the tab field in the mint.json file as follows:

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

Speakeasy-generated code snippets can now be viewed in the Mintlify API reference documentation. See the code snippets in action in the interactive playground (opens in a new tab) of the Mintlify-powered documentation site.

Update the mint.json configuration file

Mintlify offers flexible customization options for API references generated from OpenAPI documents. For more information, refer to the Mintlify documentation (opens in a new tab).