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

# Installation

> Install and configure the Osmosis AI Python SDK

## Requirements

* Python 3.9 or higher
* pip package manager

## Install via pip

```bash theme={null}
pip install osmosis-ai
```

This installs both the Python library and the CLI tool.

## Set Up API Keys

Configure API keys for the LLM providers you'll use:

```bash theme={null}
# OpenAI
export OPENAI_API_KEY="sk-..."

# Anthropic (Claude)
export ANTHROPIC_API_KEY="sk-ant-..."

# Google Gemini
export GOOGLE_API_KEY="..."
```

<Tip>
  You only need API keys for the providers you'll use. The SDK supports OpenAI, Anthropic, Gemini, xAI, OpenRouter, and Cerebras.
</Tip>

### Using .env Files

Create a `.env` file in your project:

```bash theme={null}
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
```

Load it in your code:

```python theme={null}
from dotenv import load_dotenv
load_dotenv()
```

## Verify Installation

Test the Python SDK:

```python theme={null}
from osmosis_ai import osmosis_reward

@osmosis_reward
def test_fn(solution_str: str, ground_truth: str, extra_info: dict = None) -> float:
    return 1.0

print(test_fn("hello", "hello"))  # Output: 1.0
```

Test the CLI:

```bash theme={null}
osmosis --help
```

## Troubleshooting

**Import Error**: Make sure you installed `osmosis-ai` (not `osmosis-sdk`)

```bash theme={null}
pip install osmosis-ai
```

**CLI Not Found**: Reinstall and verify PATH

```bash theme={null}
pip install --force-reinstall osmosis-ai
which osmosis
```

**API Key Error**: Verify environment variables are set

```python theme={null}
import os
print(os.getenv("OPENAI_API_KEY"))
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Quick Start" icon="rocket" href="/python-sdk/quickstart">
    Your first evaluation in 5 minutes
  </Card>

  <Card title="CLI Quick Start" icon="terminal" href="/python-sdk/cli-quickstart">
    Batch evaluate with the CLI tool
  </Card>
</CardGroup>
