mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
4c31f3683c
* ai/ keywords * api/ keywords * components/ keywords * create/ keywords * customize/ keywords * api-playground/ keywords * dashboard/ keywords * deploy/ keywords * guides/ keywords * insights/ keywords * integrations/ keywords * optimize/ keywords * organize/ keywords * root/ keywords * rm temp files
78 lines
2.8 KiB
Plaintext
78 lines
2.8 KiB
Plaintext
---
|
|
title: "Speakeasy"
|
|
description: "Automate SDK code samples in your API playground."
|
|
keywords: ["Speakeasy SDK", "autogenerated SDKs", "SDK code samples", "API playground integration"]
|
|
---
|
|
|
|
Autogenerated code snippets from Speakeasy SDKs can be integrated directly into Mintlify API reference documentation. SDK usage snippets are shown in the [interactive playground](/api-playground/overview) of Mintlify-powered documentation sites.
|
|
|
|
<Frame>
|
|

|
|
</Frame>
|
|
|
|
## Prerequisites
|
|
|
|
To integrate Mintlify with Speakeasy, you'll need the following:
|
|
|
|
- A [Mintlify documentation repository](/quickstart#creating-the-repository).
|
|
- A Speakeasy-generated SDK with a configured [automated code sample URL](https://www.speakeasy.com/docs/code-samples/automated-code-sample-urls).
|
|
|
|
## 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](https://app.speakeasy.com) and open the **API Registry** tab. Open the `*-with-code-samples` entry for the API.
|
|
|
|
<Frame>
|
|

|
|
</Frame>
|
|
|
|
<Note>
|
|
If the entry is not labeled **Combined Spec**, ensure that the API has an [automatic code sample URL](https://www.speakeasy.com/docs/code-samples/automated-code-sample-urls) configured.
|
|
</Note>
|
|
|
|
From the registry entry's page, copy the provided public URL.
|
|
|
|
<Frame>
|
|

|
|
</Frame>
|
|
|
|
### 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:
|
|
|
|
```json 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:
|
|
|
|
```json 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.
|