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

# SDKs

> All official Livepeer SDKs: Studio SDK (TypeScript, Python, Go), AI SDK, and React UI Kit. Versions, install commands, and links to full reference.

> [!TIP]
>
> The Studio SDK (`livepeer`) covers all Livepeer resources: streams, assets, webhooks, and AI inference. Use it for new projects. The AI SDK (`@livepeer/ai`) covers AI inference only and is in alpha.

***

SDK Overview

## SDK families

Two SDK families exist. Choose based on what you are building:

<table>
  <thead>
    <tr>
      SDK

      Package

      Covers

      Status
    </tr>
  </thead>

  <tbody>
    <tr>
      **Studio SDK -- TypeScript**

      `livepeer` (npm)

      Streams, assets, webhooks, signing keys, multistream, AI inference

      Stable (v3.5.0)
    </tr>

    <tr>
      **Studio SDK -- Python**

      `livepeer` (PyPI)

      Same as TypeScript SDK

      Stable
    </tr>

    <tr>
      **Studio SDK -- Go**

      `github.com/livepeer/livepeer-go`

      Same as TypeScript SDK

      Stable
    </tr>

    <tr>
      **React UI Kit**

      `@livepeer/react` (npm)

      Player component, Broadcast component, playback hooks

      Stable (v4.3.2)
    </tr>

    <tr>
      **AI SDK -- TypeScript**

      `@livepeer/ai` (npm)

      AI inference endpoints only (all 9 batch pipelines)

      Alpha
    </tr>

    <tr>
      **AI SDK -- Python**

      `livepeer-ai` (PyPI)

      AI inference endpoints only

      Alpha
    </tr>

    <tr>
      **AI SDK -- Go**

      `github.com/livepeer/livepeer-ai-go`

      AI inference endpoints only

      Alpha
    </tr>
  </tbody>
</table>

Studio SDK

## Studio SDK

The Studio SDK is auto-generated from the Studio OpenAPI spec by [Speakeasy](https://speakeasyapi.dev) and maintained in the official Livepeer repositories. It is the recommended choice for production applications.

### TypeScript / JavaScript

```bash theme={null}
npm install livepeer
```

* **npm:** [https://www.npmjs.com/package/livepeer](https://www.npmjs.com/package/livepeer)
* **GitHub:** [https://github.com/livepeer/livepeer-js](https://github.com/livepeer/livepeer-js)
* **Version:** 3.5.0

All Studio API resources are available under namespaced clients:

```typescript theme={null}
import { Livepeer } from 'livepeer';
const client = new Livepeer({ apiKey: process.env.LIVEPEER_API_KEY });

// Video
client.stream.create(...)
client.stream.get(streamId)
client.asset.create(...)
client.asset.get(assetId)
client.webhook.create(...)
client.signingKey.create()

// AI inference
client.generate.textToImage(...)
client.generate.imageToImage(...)
client.generate.imageToVideo(...)
client.generate.audioToText(...)
client.generate.llm(...)
```

### Python

```bash theme={null}
pip install livepeer
```

* **PyPI:** [https://pypi.org/project/livepeer/](https://pypi.org/project/livepeer/)
* **GitHub:** [https://github.com/livepeer/livepeer-python](https://github.com/livepeer/livepeer-python)

```python theme={null}
from livepeer import Livepeer
client = Livepeer(api_key=os.environ['LIVEPEER_API_KEY'])
```

### Go

```bash theme={null}
go get github.com/livepeer/livepeer-go
```

* **GitHub:** [https://github.com/livepeer/livepeer-go](https://github.com/livepeer/livepeer-go)

```go theme={null}
import livepeer "github.com/livepeer/livepeer-go"
client := livepeer.New(livepeer.WithSecurity(os.Getenv("LIVEPEER_API_KEY")))
```

React UI Kit

## React UI Kit

```bash theme={null}
npm install @livepeer/react
```

* **npm:** [https://www.npmjs.com/package/@livepeer/react](https://www.npmjs.com/package/@livepeer/react)
* **GitHub:** [https://github.com/livepeer/ui-kit](https://github.com/livepeer/ui-kit)
* **Version:** 4.3.2

The UI Kit provides composable video primitives for React applications. Key components:

* **`Player`** -- HLS and WebRTC playback with automatic protocol selection, keyboard shortcuts, and PictureInPicture
* **`Broadcast`** -- In-browser RTMP/WebRTC broadcasting
* **`Controls`** -- Play, volume, fullscreen, and quality controls

```tsx theme={null}
import * as Player from '@livepeer/react/player';

<Player.Root src="https://livepeercdn.studio/hls/{playbackId}/index.m3u8">
  <Player.Container>
    <Player.Video />
    <Player.Controls />
  </Player.Container>
</Player.Root>
```

AI SDK

## AI SDK (alpha)

The AI SDK is generated separately from the AI gateway OpenAPI spec. Use the Studio SDK for production applications; use the AI SDK for AI-inference-only projects or when you want a smaller dependency footprint.

### TypeScript

```bash theme={null}
npm install @livepeer/ai
```

* **npm:** [https://www.npmjs.com/package/@livepeer/ai](https://www.npmjs.com/package/@livepeer/ai)
* **GitHub:** [https://github.com/livepeer/livepeer-ai-js](https://github.com/livepeer/livepeer-ai-js)
* **Default gateway:** `https://dream-gateway.livepeer.cloud` (public, non-production)

```typescript theme={null}
import Livepeer from '@livepeer/ai';
const client = new Livepeer({ httpBearer: process.env.LIVEPEER_API_KEY });
const result = await client.generate.textToImage({ prompt: 'test' });
```

### Python

```bash theme={null}
pip install livepeer-ai
```

### Go

```bash theme={null}
go get github.com/livepeer/livepeer-ai-go
```

Deprecated SDKs

## Deprecated SDKs

Do not use these packages in new projects:

| Package | Status | Migration path |
| - | - | - |
| `@livepeer/webrtmp-sdk` | Deprecated | Use `@livepeer/react` Broadcast component |
| `@livepeer/react-native` | Deprecated | Use `react-native-video` (HLS) + `react-native-webrtc` (WebRTC) |
| Old `livepeer.js` monorepo | Archived | Migrate to `livepeer` npm v3.5.0 |

## Related pages

> [card] [SDK Integration Guide](/v2/developers/build/sdk-gateway.md)
>
> Full code examples, error handling, and retry configuration for all SDKs.

> [card] [APIs](/v2/developers/resources/reference/apis.md)
>
> REST API reference, OpenAPI spec, and endpoint list.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.