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

# Go

> Learn how to create your first stream using the Livepeer Go SDK.

<Steps>
  <Step title="Prerequisites">
    To get the most out of this guide, you’ll need to:

    * [Create an API key](https://livepeer.studio/dashboard/developers/api-keys)
  </Step>

  <Step title="Install the SDK">
    Get the Livepeer Go SDK.

    ```bash theme={"theme":{"light":"github-light","dark":"dark-plus"}}
    go get github.com/livepeer/livepeer-go
    ```
  </Step>

  <Step title="Initialize the SDK">
    The first step is to initialize the SDK with your Livepeer Studio API key.

    ```go theme={"theme":{"light":"github-light","dark":"dark-plus"}}
    package main

    import (
    	"context"
    	livepeer "github.com/livepeer/livepeer-go"
    	"github.com/livepeer/livepeer-go/models/components"
    	"log"
    )

    func main() {
    	lpClient := livepeer.New(
    		livepeer.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
    	)
    }
    ```
  </Step>

  <Step title="Use the SDK">
    Now that you have the SDK installed and initialized, you can use it in your app.
    Let's create a stream.

    ```go theme={"theme":{"light":"github-light","dark":"dark-plus"}}
    package main

    import (
    	"context"
    	livepeer "github.com/livepeer/livepeer-go"
    	"github.com/livepeer/livepeer-go/models/components"
    	"log"
    )

    func main() {
    	lpClient := livepeer.New(
    		livepeer.WithSecurity("<YOUR_BEARER_TOKEN_HERE>"),
    	)

    	ctx := context.Background()
    	res, err := lpClient.Stream.Create(ctx, components.NewStreamPayload{
    		Name: "test_stream",
    	})
    	if err != nil {
    		log.Fatal(err)
    	}
    	if res.Stream != nil {
    		log.Printf("Stream created successfully")
    	}
    }

    ```
  </Step>

  <Step title="Try it yourself">
    <Card title="Golang Example" href="https://github.com/livepeer/livepeer-go/tree/main/example" icon="arrow-up-right-from-square">
      See an example on GitHub.
    </Card>
  </Step>
</Steps>

## Next steps

Checkout Livepeer [API Reference](/api-reference) to learn more about the
Livepeer API and the Go SDK.
