Installation

Prerequisites

Before installing the Stream Python AI SDK, make sure you have:

  • Stream Account: You’ll need an account which can be created from the Stream Dashboard
  • Package Manager (Optional but recommended): We recommend using uv for faster dependency management

Installation

You can use either pip or uv to install the Stream Python AI SDK:

pip install --pre "getstream[plugins]"

# or using uv
uv add "getstream[plugins]" --prerelease=allow
The Stream Python AI SDK is an optional extension of the core Stream Python SDK. While the core SDK provides functionality for video call management, chat session handling, and user authentication, the AI SDK adds advanced capabilities tailored for video AI applications.

Environment Setup

1. Get Stream Credentials:

  • Go to Stream Dashboard
  • Create a new app or select an existing one
    Select Project
  • Copy your API Key and API Secret
    Copy API Key

2. Set Environment Variables:

All the plugins defined in the SDK try to get their API keys from environment values by default.

For a project, we recommend creating a .env file containing Stream values as well as any required plugin API keys like this:

STREAM_API_KEY=your-stream-api-key
STREAM_API_SECRET=your-stream-api-secret
STREAM_BASE_URL=https://video.stream-io-api.com/
OPENAI_API_KEY=sk-your-openai-api-key
CARTESIA_API_KEY=your-cartesia-api-key
DEEPGRAM_API_KEY=your-deepgram-api-key

...and so on

Alternatively, you can also define environment variables directly in your terminal session:

export STREAM_API_KEY=your-stream-api-key
export OPENAI_API_KEY=sk-your-openai-api-key

These values then need to be loaded before you can use any plugins:

from dotenv import load_dotenv

# Load environment variables
load_dotenv()

With this, you are now set to integrate Stream calls and AI plugins into your application.

Check out our examples folder to see practical implementations of various AI plugins and get inspiration for your own projects.

© Getstream.io, Inc. All Rights Reserved.