finds.dev

sashabaranov/go-openai

OpenAI, GPT 6.1, GPT-Image-2, Whisper API clients for Go. Zero-dependency.

View on GitHub

★ 10,789GoApache-2.0updated Sep 2026

// the take

An unofficial Go client for the OpenAI API, covering everything from the new Responses API and legacy Chat Completions to embeddings, images, audio, moderation, files, fine-tuning, batches, and vector stores. It's for Go backends that need to talk to OpenAI without pulling in a kitchen sink of dependencies.

Zero dependencies, which matters if you're vendoring or care about supply-chain surface area. API coverage is genuinely broad — Responses API with streaming and multi-turn state via PreviousResponseID, plus Chat Completions, speech, images, and the batch/vector-store endpoints most clients skip. Error handling is idiomatic Go: a typed APIError you unwrap with errors.As instead of parsing strings. Every endpoint file has a matching _test.go, and there's CI (pr.yml, integration-tests.yml) plus codecov tracking, so it's not just a pile of untested wrappers.

It's unofficial and effectively one-maintainer — when OpenAI ships a new endpoint or changes a response shape, you're waiting on this repo to catch up, not getting it day one like the Python/Node SDKs. The package still carries Assistants, Edits, Engines, and Fine-tunes — API surfaces OpenAI itself has deprecated — so you'll want to know which parts are live versus legacy cruft before building on them. More concerning: the README's quick-start section has a sponsored plug for a third-party project with an unverifiable '40% cost savings' claim sitting right next to the actual code example — that's a judgment call about what goes in core docs that's worth noticing before you trust this maintainer's other decisions. Zero-dependency also means whatever retry/backoff exists (ratelimit.go) is homegrown and worth reading before relying on it in production.

We read the README, the directory tree and a key source file in October 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
10,789
Forks
1,715
Language
Go
License
Apache-2.0
Last commit
29 Sep 2026

// nearby

If go-openai isn't quite it.

All repos →