Prerequisites
To get the most out of this guide, you’ll need to: Install the SDK
Get the Livepeer AI Python SDK. Initialize the SDK
The first step is to initialize the SDK (with your API key if required).from livepeer_ai import Livepeer
s = Livepeer(
http_bearer="<YOUR_BEARER_TOKEN_HERE>",
)
Use the SDK
Now that you have the SDK installed and initialized, you can use it to request one of the available AI services.from livepeer_ai import Livepeer
s = Livepeer(
http_bearer="<YOUR_BEARER_TOKEN_HERE>",
)
res = s.generate.text_to_image(request={
"prompt": "<value>",
})
if res.image_response is not None:
# handle response
pass
Next steps
Checkout Livepeer AI API Reference to learn more about the
Livepeer AI API and the Python SDK.Last modified on February 18, 2026