Getting Started with CalypsoAI Python SDK
Welcome to the wonderful world of CalypsoAI! Ready to secure and supercharge your AI models? This guide will walk you through everything you need to get up and running with our Python SDK—no PhD required.
1. Create an API Key
First things first: head over to the CalypsoAI platform and generate your API key. Guard this key like your favorite snack—don’t share it, and keep it somewhere safe! You’ll need it to connect your app to CalypsoAI.
2. Download and Install the Python SDK
Next up, let’s get the SDK into your project. Download the latest version of the CalypsoAI Python SDK here ↗ (link to your SDK download page). Once downloaded, install it with your favorite method (we recommend pip):pip install calypsoai
3. Set Up Authentication
Before you can start chatting with your AI models, set your environment variables so CalypsoAI knows who you are:export CALYPSOAI_URL="https://www.us1.calypsoai.app"
CALYPSOAI_URL="https://www.us1.calypsoai.app"
CALYPSOAI_TOKEN="changeme"
(Replace "your-api-key-here" with your actual API key!)
4. Send Your First Prompt to an LLM
Ready to see some magic? Here’s how to send a prompt to a Large Language Model (LLM) using Python:from calypsoai import CalypsoAI
from calypsoai import CalypsoAI
cai = CalypsoAI(url="https://www.us1.calypsoai.app", token="changeme")
prompt = cai.prompts.send("What is your name?")
print(prompt.result.response)
Prefer cURL? We’ve got you covered:
CAI_TOKEN=your-api-key-here
curl https://www.us1.calypsoai.app/backend/v1/prompts -X POST \
-H "Authorization: Bearer ${CAI_TOKEN}" \
-H 'Content-Type: application/json' \
--data-raw '{"input": "What is your name?"}'
Need More Help?
Check out our API Reference ↗ or reach out to the CalypsoAI support team. We’re always here to help you wrangle your AI with style and security!
Happy coding!