If you already call OpenAI from Go with the official openai-go SDK, you can point the same client at Wren R1 without changing your call sites. The client takes a base URL, so the endpoint becomes a configuration value.

package main

import (
	"context"

	"github.com/openai/openai-go/v3"
	"github.com/openai/openai-go/v3/option"
)

func main() {
	client := openai.NewClient(
		option.WithAPIKey("YOUR_WEBWRIGHT_KEY"),
		option.WithBaseURL("https://webwright.ai/v1"),
	)

	models, err := client.Models.List(context.Background())
	if err != nil {
		panic(err)
	}
	for _, m := range models.Data {
		println(m.ID) // wren-r1
	}
}

A chat completion

The chat endpoint accepts the standard OpenAI chat payload, so the request you already write works here.

completion, err := client.Chat.Completions.New(context.Background(), openai.ChatCompletionNewParams{
	Messages: []openai.ChatCompletionMessageParamUnion{
		openai.UserMessage("Reply with the single word: ready"),
	},
	Model: "wren-r1",
})
if err != nil {
	panic(err)
}
println(completion.Choices[0].Message.Content)

Transcribing audio

The same client and base URL reach the transcription endpoint. Pass the audio file and the transcription model.

import "os"

file, err := os.Open("meeting.mp3")
if err != nil {
	panic(err)
}
defer file.Close()

transcript, err := client.Audio.Transcriptions.New(context.Background(), openai.AudioTranscriptionNewParams{
	File:  file,
	Model: "whisper-large-v3-turbo",
})
if err != nil {
	panic(err)
}
println(transcript.Text)

One base URL, one key

Chat and transcription share the base URL and the key. Read both from the environment, keep them out of source control, and the endpoint stays a value your deploy can change without touching the call sites.

The WebWright Team