SDK Sandboxes

Speakeasy can seamlessly generate dev container configurations for your SDK repositories to give you and your SDK consumers an intuitive, predefined sandbox environment to explore the capabilities of your SDK. Beyond setting up this environment, Speakeasy has CLI commands that allow SDK users to effortlessly generate example usage snippets for any API operation within this container setting.

Success Icon


SDK Sandboxes are currently available in Go, TypeScript, and Python SDKs.

Configuring SDK Sandboxes

To set up the automatically generated dev container configurations, you'll need to make minor adjustments to your gen.yaml file. The schemaPath shown below should reference your SDK's OpenAPI spec, which can be a local path or a remote URL.

Dev Container gen.yaml:

configVersion: 1.0.0
enabled: true
schemaPath: ./openapi.yaml

The result of generation will be a newly created .devcontainer directory containing a configuration file like the one shown below.

Generated devcontainer.json:

// For format details, see For config options, see the
// README at:
"name": "Go",
"image": "",
// Features to add to the dev container. More info:
// "features": {},
// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "sudo chmod +x ./.devcontainer/ && ./.devcontainer/",
"customizations": {
"vscode": {
"extensions": [
"github.vscode-pull-request-github" // Github interaction
"settings": {
"files.eol": "\n",
"editor.formatOnSave": true,
"go.buildTags": "",
"go.toolsEnvVars": {
"go.useLanguageServer": true,
"go.testEnvVars": {
"go.testFlags": [
"go.testTimeout": "60s",
"go.coverOnSingleTest": true,
"go.coverOnSingleTestFile": true,
"go.coverOnTestPackage": true,
"go.lintTool": "golangci-lint",
"go.lintOnSave": "package",
"[go]": {
"editor.codeActionsOnSave": {
"source.organizeImports": true
"gopls": {
"usePlaceholders": false,
"staticcheck": true,
"vulncheck": "Imports"
"codespaces": {
"openFiles": [
// Uncomment to connect as root instead. More info:
// "remoteUser": "root"

Using SDK Sandboxes in the Browser

Your SDK users can instantly initialize a sandbox in GitHub Codespaces (opens in a new tab) with a single click. By default, GitHub Codespaces shifts the cost to the user. However, you have the option to configure your organization (opens in a new tab) to offer complimentary codespaces to your users if you prefer.

Open a Dev Container for a given repo

Start a Dev Container from a README badge