Prerequisites
Before you begin, you’ll need:- A Claro account - Sign up here
- Python 3.8 or higher installed
- At least one prompt created in your Claro workspace
Step 1: Get Your API Key
1
Navigate to API Keys
Log into Claro and click API Keys from the sidebar
2
Create API Key
Click Create API Key, give it a name (e.g., “Development”), and copy the key
3
Set Environment Variable
Add your API key to your environment:
Step 2: Install the SDK
Install the Claro Python SDK using pip:Verify installation
Verify installation
Step 3: Make Your First API Call
Create a new Python file calledtest_claro.py:
Replace
@workspace/my-prompt:v1 with the package name of a prompt from your Claro workspace.Find your prompt’s package name in the Claro dashboard under the prompt’s settings.Step 4: Use With an LLM
Now let’s use the prompt with an actual LLM. Here’s an example with OpenAI:Next Steps
Now that you’re up and running, explore more features:Python SDK Guide
Learn about all SDK features and configuration options
Working with Prompts
Discover prompt versioning, variables, and context
Code Examples
Browse production-ready examples
Error Handling
Learn how to handle errors gracefully
Common Issues
ModuleNotFoundError: No module named 'claro'
ModuleNotFoundError: No module named 'claro'
Make sure you’ve installed the SDK:If you’re using a virtual environment, ensure it’s activated.
BaytAuthError: Invalid API key
BaytAuthError: Invalid API key
Double-check that:
- Your API key is set correctly in the environment variable
- You haven’t accidentally included extra spaces or quotes
- The API key hasn’t been deleted from your Claro account
BaytNotFoundError: Prompt not found
BaytNotFoundError: Prompt not found
Verify that:
- The package name is correct (including
@workspace/prefix) - The version exists (e.g.,
:v1,:v2) - You have access to the workspace containing the prompt
Need Help?
- Email: [email protected]
- Documentation: docs.baytos.ai
- Platform: claro.baytos.ai