GitHub · #754

sashabaranov/go-openai

OpenAI, GPT 6.1, GPT-Image-2, Whisper API clients for Go. Zero-dependency. On Linux: git clone, then go build ./... 10,785 GitHub stars (#754 in this directory).

Repository
https://github.com/sashabaranov/go-openai
Owner
sashabaranov (User)
Stars
10,785
Forks
1,713
Open issues
219
Language
Go
License
Apache-2.0
Created
2020-08-18
Last push
2026-09-29
Topics
chatgpt, chatgpt-api, dall-e, go, golang, openai, openai-whisper, streaming-api
Snapshot
2026-10-18 · weekly refresh

Try it on Shadowfetch Linux.

Shadowfetch Linux is a Debian testing desktop with KDE Plasma, local AI tools, and ShadowCode. Clone this repository there, follow the steps for its primary language, and ask ShadowCode to finish the build.

Clone and build with Go.

git clone https://github.com/sashabaranov/go-openai.git
cd go-openai
go build ./...

Some modules expose a main package in a cmd/ directory; build that path if ./... is not enough.

ShadowCode prompt.

Paste this into ShadowCode after you open the project.

Clone https://github.com/sashabaranov/go-openai into ~/Workspaces/go-openai.
Read the README.
On this Shadowfetch Linux desktop, run go mod download if needed, then go build and run the main module.
Ask before installing packages or using the network.

Download Shadowfetch Linux — ISO, checksum and signature.

Back to the GitHub directory · Methodology