> ## Documentation Index
> Fetch the complete documentation index at: https://docs.baytos.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get up and running with Claro in 5 minutes

Get your first prompt from Claro in just a few steps. This guide will have you making API calls in less than 5 minutes.

## Prerequisites

Before you begin, you'll need:

* A Claro account - [Sign up here](https://claro.baytos.ai/signup)
* Python 3.8 or higher installed
* At least one prompt created in your Claro workspace

## Step 1: Get Your API Key

<Steps>
  <Step title="Navigate to API Keys">
    Log into [Claro](https://claro.baytos.ai) and click **API Keys** from the sidebar
  </Step>

  <Step title="Create API Key">
    Click **Create API Key**, give it a name (e.g., "Development"), and copy the key

    <Warning>
      Save your API key immediately - you won't be able to see it again after closing the dialog.
    </Warning>
  </Step>

  <Step title="Set Environment Variable">
    Add your API key to your environment:

    ```bash theme={null}
    export BAYT_API_KEY="your_api_key_here"
    ```

    <Tip>
      Add this to your `~/.bashrc`, `~/.zshrc`, or `.env` file to persist across sessions
    </Tip>
  </Step>
</Steps>

## Step 2: Install the SDK

Install the Claro Python SDK using pip:

```bash theme={null}
pip install baytos-claro
```

<Accordion title="Verify installation">
  ```bash theme={null}
  python -c "import baytos.claro; print(claro.__version__)"
  ```
</Accordion>

## Step 3: Make Your First API Call

Create a new Python file called `test_claro.py`:

```python theme={null}
import os
from baytos.claro import BaytClient

# Initialize the client
client = BaytClient(api_key=os.getenv("BAYT_API_KEY"))

# Get a prompt (replace with your prompt's package name)
prompt = client.get_prompt("@workspace/my-prompt:v1")

# Use the prompt
print(f"Title: {prompt.title}")
print(f"\nPrompt content:\n{prompt.generator}")
```

Run it:

```bash theme={null}
python test_claro.py
```

<Note>
  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.
</Note>

## Step 4: Use With an LLM

Now let's use the prompt with an actual LLM. Here's an example with OpenAI:

```python theme={null}
import os
from baytos.claro import BaytClient
from openai import OpenAI

# Initialize clients
claro_client = BaytClient(api_key=os.getenv("BAYT_API_KEY"))
openai_client = OpenAI(api_key=os.getenv("OPENAI_API_KEY"))

# Get your prompt from Claro
prompt = claro_client.get_prompt("@workspace/customer-support:v1")

# Use it with OpenAI
response = openai_client.chat.completions.create(
    model="gpt-4",
    messages=[
        {"role": "system", "content": prompt.generator},
        {"role": "user", "content": "How do I reset my password?"}
    ]
)

print(response.choices[0].message.content)
```

<Tip>
  When your team updates the prompt in Claro, your next API call automatically gets the new version. No code changes needed.
</Tip>

## Next Steps

Now that you're up and running, explore more features:

<CardGroup cols={2}>
  <Card title="Python SDK Guide" icon="python" href="/sdk/python/installation">
    Learn about all SDK features and configuration options
  </Card>

  <Card title="Working with Prompts" icon="sparkles" href="/sdk/python/prompts">
    Discover prompt versioning, variables, and context
  </Card>

  <Card title="Code Examples" icon="code" href="/examples/basic-usage">
    Browse production-ready examples
  </Card>

  <Card title="Error Handling" icon="shield" href="/sdk/python/error-handling">
    Learn how to handle errors gracefully
  </Card>
</CardGroup>

## Common Issues

<AccordionGroup>
  <Accordion title="ModuleNotFoundError: No module named 'claro'">
    Make sure you've installed the SDK:

    ```bash theme={null}
    pip install baytos-claro
    ```

    If you're using a virtual environment, ensure it's activated.
  </Accordion>

  <Accordion title="BaytAuthError: Invalid API key">
    Double-check that:

    1. Your API key is set correctly in the environment variable
    2. You haven't accidentally included extra spaces or quotes
    3. The API key hasn't been deleted from your Claro account
  </Accordion>

  <Accordion title="BaytNotFoundError: Prompt not found">
    Verify that:

    1. The package name is correct (including `@workspace/` prefix)
    2. The version exists (e.g., `:v1`, `:v2`)
    3. You have access to the workspace containing the prompt
  </Accordion>
</AccordionGroup>

## Need Help?

* **Email:** [support@baytos.ai](mailto:support@baytos.ai)
* **Documentation:** [docs.baytos.ai](https://docs.baytos.ai)
* **Platform:** [claro.baytos.ai](https://claro.baytos.ai)
