> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ai-stats.phaseo.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Go SDK (preview)

> Local-preview Go wrapper for the AI Stats API.

<Note type="warning">
  The Go SDK is in preview and is not yet published to a package registry.
</Note>

The local wrapper at `packages/sdk/sdk-go/index.go` currently exposes these methods:

* `GenerateText(...)`
* `GenerateResponse(...)`
* `GenerateEmbedding(...)`
* `GenerateModeration(...)`
* `CreateSpeech(...)`, `CreateTranscription(...)`, `CreateTranslation(...)`
* `CreateAnthropicMessage(...)`
* `GetModels(...)`
* `ListOrganisations(...)`
* `ListPricingModels(...)`
* `CalculatePricing(...)`
* `ListApiKeys(...)`
* `CreateApiKey(...)`, `UpdateApiKey(...)`, `DeleteApiKey(...)`
* `GetApiKey(...)`
* `ListWorkspaces(...)`, `GetWorkspace(...)`, `CreateWorkspace(...)`, `UpdateWorkspace(...)`, `DeleteWorkspace(...)`
* `GetCurrentApiKey(...)`
* `ListEndpoints(...)`
* `ListProviders(...)`
* `GetAnalytics(...)`, `GetCredits(...)`, `GetActivity(...)`
* `CreateBatch(...)`, `RetrieveBatch(...)`, `CancelBatch(...)`
* `GetAsyncJobWebSocketURL(...)`, `GetBatchWebSocketURL(...)`, `GetVideoWebSocketURL(...)`, `client.AsyncJobs.WebSocketURL(...)`
* `ListFiles(...)`, `RetrieveFile(...)`, `RetrieveFileContent(...)`
* `RetrieveVideoContent(...)`, `GetVideoDownloadURL(...)`
* `GetGeneration(...)`
* `Health(...)`
* `GetModelDeprecationInfo(...)`, `ValidateModel(...)`
* `CreateImage(...)`, `CreateImageEdit(...)`
* `GenerateVideo(...)`, `GetVideo(...)`, `CancelVideo(...)`, `DeleteVideo(...)`
* `ListVideoModels(...)`, `ListVideos(...)`

For endpoints that are not yet promoted to the wrapper, use the generated client under `packages/sdk/sdk-go/src/gen` directly.

```go theme={null}
import (
  "context"
  "fmt"
  aistats "github.com/AI-Stats/AI-Stats/packages/sdk/sdk-go"
)

client := aistats.New("YOUR_KEY", "https://api.phaseo.app/v1")
models, err := client.GetModels(context.Background(), map[string]string{"limit": "5"})
if err != nil {
  panic(err)
}
fmt.Println(models)
```
