Skip to main content
Use the wrapper method:
  • client.CreateSpeech(ctx, req)
import (
  "context"
  "fmt"
  phaseo "github.com/phaseoteam/Phaseo/packages/sdk/sdk-go"
)

client := phaseo.New(apiKey, "https://api.phaseo.ai/v1")
resp, err := client.CreateSpeech(context.Background(), map[string]interface{}{
  "model": "openai/gpt-4o-mini-tts",
  "input": "Hello from Phaseo",
  "voice": "alloy",
  "format": "mp3",
})
if err != nil {
  panic(err)
}
fmt.Println(resp)
Last modified on July 9, 2026