Metadata-Version: 2.4
Name: brocodeai
Version: 0.1.0
Summary: The official Python client for the Brocode AI unified API
Home-page: https://github.com/Kedarcv/brocodeai-python
Author: Michael Nkomo
Author-email: michaelmlungisinkomo@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.23.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Brocode AI Python SDK

The official Python library for the Brocode AI unified API. Access over 100+ frontier AI models via a single standardized interface.

## Installation

```bash
pip install brocodeai
```

## Usage

You need a Brocode AI API key. Get yours at the [Brocode AI Dashboard](https://brocodeai-rho.vercel.app).

```python
import os
from brocodeai import BrocodeAI

# Initialize the client. It will automatically look for the BROCODEAI_API_KEY environment variable.
client = BrocodeAI(
    api_key=os.environ.get("BROCODEAI_API_KEY"),
)

# Chat Completions
chat_completion = client.chat.completions.create(
    messages=[
        {
            "role": "user",
            "content": "Say this is a test",
        }
    ],
    model="meta/llama-3.1-70b-instruct",
)

print(chat_completion.choices[0].message.content)

# Embeddings
embedding = client.embeddings.create(
    input="Convert this text to an embedding.",
    model="nvidia/nv-embedqa-e5-v5"
)
print(embedding.data[0].embedding)
```
