Skip to content

Integrate Speakeasy with ReadMe


Autogenerated code snippets from Speakeasy SDKs can be integrated directly into a ReadMe documentation site.

docs.myapi.com
Speakeasy code snippets with ReadMe

To integrate ReadMe with Speakeasy, the following is required:

To display code samples from Speakeasy SDKs in ReadMe, update the workflow.yaml file to support their proprietary OpenAPI extension.

In the SDK target configuration, set the codeSamples.style field to readme:

targets:
my-target:
target: typescript
codeSamples:
# !mark(1:2)
style: readme
langOverride: javascript # see note below
registry:
location: registry.speakeasy.com/...
blocking: false
...

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

Section titled “Get the API’s combined spec public URL from the registry”

Navigate to the Speakeasy Dashboard and click on the Docs tab. Select the Integrate with a Docs Provider option.

app.speakeasy.com
Screenshot showing the Speakeasy Dashboard Docs tab with Integrate with a Docs Provider option

On the Integrate with a Docs Provider page, select the correct OpenAPI document using the Change OpenAPI Documents button. Then, copy the Spec URL.

app.speakeasy.com
Screenshot showing the Integrate with a Docs Provider page with the Spec URL to copy

Make sure the Public toggle is enabled, so Mintlify can access the OpenAPI document.

In the ReadMe dashboard, open the project.

dash.readme.com
ReadMe dashboard

Click the API Reference tab, then click + New API Definition.

myapi.readme.io
ReadMe API Reference page

Paste the combined spec URL from Speakeasy into the text input below Import from URL, then click Import.

myapi.readme.io
Filling the ReadMe OAS import form

Speakeasy-generated code snippets are now available in the ReadMe project’s API Reference section.

For help customizing ReadMe API references generated from OpenAPI documents, see the ReadMe OpenAPI support documentation.