Documentation
¶
Overview ¶
Package soxai provides a Go client for the SoxAI unified AI API gateway.
SoxAI gives you access to 200+ AI models from 40+ providers (OpenAI, Anthropic, Google, DeepSeek, etc.) through one OpenAI-compatible API.
Example:
client := soxai.NewClient(os.Getenv("SOXAI_API_KEY"))
resp, err := client.Chat.Completions.New(ctx, openai.ChatCompletionNewParams{
Model: "claude-sonnet-4-6",
Messages: []openai.ChatCompletionMessageParamUnion{
openai.UserMessage("Hello!"),
},
})
Get your API key: https://console.soxai.io/register (free $5 credit) Model list: https://www.soxai.io/models Documentation: https://www.soxai.io/docs
Index ¶
Constants ¶
const BaseURL = "https://api.soxai.io/v1"
BaseURL is the default SoxAI gateway endpoint.
const Version = "0.1.0"
Version is the current version of the soxai-go package.
Variables ¶
This section is empty.
Functions ¶
func NewClient ¶
func NewClient(apiKey string, opts ...option.RequestOption) openai.Client
NewClient returns an openai.Client pre-configured for the SoxAI gateway.
All OpenAI Go SDK features work exactly the same — requests route through SoxAI to 200+ models. Pass additional option.RequestOption values to override defaults (e.g. custom HTTP client, timeouts, headers).
If apiKey is empty, the client will fall back to the OPENAI_API_KEY environment variable (consistent with the underlying openai-go behavior).
Types ¶
This section is empty.