# SpendLens

Track your OpenAI costs by user, feature, and endpoint. Two-line integration.

## Install

```
pip install spendlens
```

## Usage

```python
from spendlens import SpendLensClient

client = SpendLensClient(api_key="your-spendlens-api-key")

response = client.chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "Hello"}],
    tags={"user_id": "u_123", "feature": "chat", "endpoint": "/api/chat"},
)
```

Your costs appear on the dashboard. That's it.

- Never logs prompts or completions. Only metadata.
- Never modifies the OpenAI response.
- Never adds latency. Logging is async.
