Skip to main content
You can integrate autogenerated code snippets from Speakeasy SDKs directly into Mintlify API reference documentation. SDK usage snippets appear 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:

Set 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

Go 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. A red square and the number 1 emphasize the API Registry tab, and a red square and the number 2 emphasize the entry for the API.
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
Add the combined spec URL to a tab by updating the tab field in the docs.json file as follows:
docs.json
You can now view Speakeasy-generated code snippets in your API docs and interact with them in the playground.

Verify the integration

After you redeploy your documentation, open any endpoint in your API reference and confirm that language snippets appear in the playground. The set of available languages matches the SDK targets configured in your Speakeasy project. If snippets do not appear, check that:
  • The openapi URL in docs.json points to the *-with-code-samples combined spec entry, not the source OpenAPI file.
  • The combined spec URL is publicly reachable from the browser.
  • Your Speakeasy project has an automated code sample URL configured and at least one SDK target enabled.