Skip to main content
The official OpenAI Go SDK supports a custom base URL and works with Yelu’s OpenAI-compatible endpoints. The current v3 SDK requires Go 1.22 or later.

Install

Configure the client

Create a response

Add a deadline

Pin the SDK major version in go.mod and review upstream release notes before upgrading. Yelu’s HTTP contract is OpenAI-compatible, while generated SDK types can evolve independently.
For endpoints or fields not represented by your installed SDK version, use Go’s net/http package against the documented REST endpoint.
Last modified on July 13, 2026