Get an API key
Before you can start using the SDK, you’ll need to obtain your API key from AI21 Studio.Installation
Install ai21 Python SDK with your favorite package manager.Authentication
There are two ways to authenticate with the SDK:Option 1: Pass the API key directly
For details on how authentication works at the HTTP level, see the API Refrence Autentication.
Example usage
This example demonstrates how to initialize the AI21 Python SDK client and send a simple chat message using thejamba-mini
model.