# Go SDK setup
## Construction
```
pc, err := pinecone.NewClient(pinecone.NewClientParams{
ApiKey value os.Getenv("PINECONE_API_KEY"),
RetryPolicy: pinecone.DefaultRetryPolicy(),
})
```
`DefaultRetryPolicy` is 3 retries, 500ms base, 30s cap, 2x backoff with jitter. Customize with your own `RetryPolicy` (MaxRetries, BaseDelay, MaxDelay, BackoffMultiplier) when the defaults do not fit.
## What the policy covers
429 and transient 5xx plus gRPC UNAVAILABLE, on both the REST clients (control, data, inference) and the gRPC data-plane client. Other 4xx errors are never retried, which is correct: they are request bugs.
## Rules for agents
1. Set the retry policy at construction, not per call. Scattered retry logic drifts.
2. Read the key from the environment. Do not accept it as a CLI flag that ends up in process listings.
3. The same readiness rule applies: poll describe until ready after creating an index, even in Go.
4. Keep the SDK version current; the retry behavior and API versions move with it.
## Trap
Assuming the Go client retries everything. A 400 or 403 through this client fails fast by design; if your code expected a retry, the bug is the expectation.