Build with AssemblyAISDK References

Go SDK Reference

Deprecation Notice

As of April 2025, AssemblyAI Go SDK has been discontinued and will no longer be maintained. While the SDK will no longer be updated, any previously published releases will remain available.

Going forward, see the API Reference Guide for information on how to integrate with our API directly.

We know this is a disruptive change. If you need help with this transition, reach out to our Support team at support@assemblyai.com and we’ll help you in any way we can.

AssemblyAI Go SDK

A Go client library for accessing AssemblyAI.

Quickstart

Installation

$go get github.com/AssemblyAI/assemblyai-go-sdk

Tips and tricks

Inspect API errors

If you receive an API error, you can inspect the HTTP response returned by the API for more details:

1transcript, err := client.Transcripts.TranscribeFromURL(ctx, audioURL, nil)
2if err != nil {
3 var apierr aai.APIError
4 if errors.As(err, &apierr) {
5 // apierr.Response is the *http.Response from the API call.
6 fmt.Println(apierr.Response.StatusCode)
7 } else {
8 // err is not an API error.
9 }
10}