---
title: Go | Rails
description: Add the Rails Go module and construct a client with functional options.
---

## Install

Import the module (imported as **`rails`** in the README examples):

```
import (
  "github.com/railsinfra/rails-go" // imported as rails
)
```

To pin a version, the README uses:

Terminal window

```
go get -u 'github.com/railsinfra/rails-go@v0.1.0'
```

Replace the version with the tag you intend to ship; **`go 1.22+`** is required.

## Client

`rails.NewClient` with options from **`github.com/railsinfra/rails-go/option`** (for example `option.WithAPIKey`, `option.WithEnvironmentProduction`) matches the README’s main example.

Use the **[API Reference](/api/index.md)** tab for endpoint shapes and examples alongside this SDK.

## Runnable sample

For Swagger UI against your gateway, follow **Path A** on the [Quick start overview](/guides/quick-start/index.md) and use [`rails-sdk-samples/go/`](https://github.com/railsinfra/rails-sdk-samples/tree/main/go) (default port **8083** per the overview).
