Skip to main content

Install Speakeasy's SDK

The Speakeasy SDK is the primary mechanism for passing API data to Speakeasy. With the data collected from API requests, Speakeasy is able to power a number of use cases. For more details on what you can use Speakeasy for, see the Use Speakeasy section. SDKs are available for a number of languages and frameworks. They are open-sourced under Apache 2.0.

When installing the SDK you will need a few values to include in the configuration:

  • APIKey: This key identifies your account within the Speakeasy platform. If you need a key, head over to the API Keys tab in the Speakeasy platform and click "New API Key".
  • ApiID: This is an arbitrary ID to help you identify you API within the platform. Use something that is meaningful to your team. Supports any string up to 128 characters, using Alphanumeric characters or the following symbols (. - _ ~). For example: test-api
  • VersionID: Use this field to demarcate the version of the API that you are tracking. Supports any string up to 128 characters, using Alphanumeric characters or the following symbols (. - _ ~). For example: v1.0.0

Full Documentation available on

The Speakeasy Go SDK for evaluating API requests/responses. Compatible with any API framework implemented on top of Go's native http library.


Supported routers:

  • gorilla/mux
  • go-chi/chi
  • http.DefaultServerMux

We also support custom HTTP frameworks:

  • gin-gonic/gin
  • labstack/echo


Speakeasy uses Go Modules to manage dependencies.

go get

Minimum configuration

  1. Sign up for free on our platform. Create a workspace and generate an API key

  2. Import and configure the Speakeasy SDK as below. Note:

    • APIKey: enter the key you generated above
    • ApiID and VersionID: these are labels that you can specify. Requests from your API will show up in the web application using this ApiID (name) and version label.
    import ""

    func main() {
    // Configure the Global SDK
    speakeasy.Configure(speakeasy.Config {
    APIKey: "YOUR API KEY HERE", // retrieve from Speakeasy API dashboard.
    ApiID: "YOUR API ID HERE", // enter a name that you'd like to associate captured requests with.
    // This name will show up in the Speakeasy dashboard. e.g. "PetStore" might be a good ApiID for a Pet Store's API.
    // No spaces allowed.
    VersionID: "YOUR VERSION ID HERE", // enter a version that you would like to associate captured requests with.
    // The combination of ApiID (name) and VersionID will uniquely identify your requests in the Speakeasy Dashboard.
    // e.g. "v1.0.0". You can have multiple versions for the same ApiID (if running multiple versions of your API)

    // Associate the SDK's middleware with your router
    r := mux.NewRouter()
  3. Build and deploy your app.

That's it! Go to your dashboard to view and manage your API Ops.

Visit our docs site to learn more.

Supported Versions


  • Request Capture