from ai21 import AI21Client
# Initialize the client
client = AI21Client(
api_key="your_api_key_here" # or use environment variable AI21_API_KEY
)
# Delete a file by its ID
try:
client.library.files.delete("your-file-id-here")
print("File deleted successfully")
except Exception as e:
print(f"Error deleting file: {e}")