Autogenerated code snippets from Speakeasy SDKs can be integrated directly into Mintlify API reference documentation. SDK usage snippets are shown in the interactive playground of Mintlify-powered documentation sites.
A Mintlify API playground with Speakeasy code snippets.

Prerequisites

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

Setting up the integration

To integrate Speakeasy with Mintlify, you must get the API’s combined spec public URL from the registry and update your docs.json configuration file.

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

Navigate to your Speakeasy Dashboard and open the API Registry tab. Open the *-with-code-samples entry for the API.
Screenshot of the Speakeasy API Registry page. The API Registry tab is emphasized with a red square and the number 1 and the entry for the API is emphasized with a red square and the number 2.
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.
Screenshot showing the combined spec registry entry with the copy URL function emphasized with a red square.

Update your docs.json configuration file

Add the combined spec URL to an Anchors or Tabs section in your docs.json file. Add the combined spec URL to an anchor by updating the anchor field in your docs.json file as follows:
docs.json
{
  "anchors": [
    {
      "name": "API Reference",
      // !mark
      "openapi": "SPEAKEASY_COMBINED_SPEC_URL",
      "url": "api-reference",
      "icon": "square-terminal"
    }
  ]
}
Add the combined spec URL to a tab by updating the tab field in the docs.json file as follows:
docs.json
{
  "tabs": [
    {
      "name": "API Reference",
      "url": "api-reference",
      // !mark
      "openapi": "SPEAKEASY_COMBINED_SPEC_URL"
    }
  ]
}
Speakeasy-generated code snippets can now be viewed in your API docs and interacted with in the playground.