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

# Go SDK

> Use the native run.cloud sandbox API from Go.

```bash theme={null}
go get github.com/newly-app/run-cloud-go
export RUN_CLOUD_API_KEY="rc_live_..."
```

```go theme={null}
package main

import (
	"context"
	"fmt"
	"log"

	runcloud "github.com/newly-app/run-cloud-go"
)

func main() {
	client, err := runcloud.NewClient(runcloud.ClientOptions{})
	if err != nil {
		log.Fatal(err)
	}
	box, err := client.CreateSandbox(
		context.Background(),
		runcloud.CreateSandboxOptions{
			Image:  "runcloud/agent-base",
			CPU:    2,
			Memory: 4096,
		},
	)
	if err != nil {
		log.Fatal(err)
	}
	defer box.Destroy(context.Background())

	result, err := box.Exec(
		context.Background(),
		"go version",
		runcloud.ExecOptions{},
	)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Print(result.Stdout)
}
```

The Go module exposes the native run.cloud sandbox API. Provider-shaped
compatibility adapters are available in TypeScript and Python, where the
corresponding upstream SDK defines the API shape being migrated.
