Use the wrapper method:
client.GenerateEmbedding(ctx, req)
import (
"context"
"fmt"
aistats "github.com/AI-Stats/ai-stats-go-sdk-wrapper"
)
client := aistats.New(apiKey, "https://api.phaseo.app/v1")
resp, err := client.GenerateEmbedding(context.Background(), map[string]interface{}{
"model": "openai/text-embedding-3-large",
"input": "sample text",
})
if err != nil {
panic(err)
}
fmt.Println(resp)
Last modified on February 18, 2026