Skip to content

Open-source Go SDK

GoAI

AI SDK, the Go way.

One unified API across 20 providers. Streaming via channels, type-safe structured output with generics, zero external dependencies.

$go get github.com/zendev-sh/goai@latestcopy
main.go
 1  package main
 2
 3  import (
 4      "context"
 5      "fmt"
 6
 7      "github.com/zendev-sh/goai"
 8      "github.com/zendev-sh/goai/provider/openai"
 9  )
10
11  func main() {
12      result, _ := goai.GenerateText(
13          context.Background(),
14          openai.Chat("gpt-4o"),
15          goai.WithPrompt("Explain goroutines."),
16      )
17      fmt.Println(result.Text)
18  }
20providers
100+models tested
24xfaster cold start
0third-party deps

GoAIAI SDK, the Go way.

One unified API across 20 providers. Streaming via channels, type-safe structured output with generics, zero external dependencies.

GoAI Gopher

Released under the MIT License.