Metadata-Version: 2.4
Name: rodiumai
Version: 0.2.0
Summary: RodiumAI SDK — Unified AI API for Africa
Project-URL: Homepage, https://rodiumai.io
Project-URL: Documentation, https://docs.rodiumai.io
Project-URL: Source, https://github.com/jeanpierreaigbede/rodiumai-python-sdk
Project-URL: Issues, https://github.com/jeanpierreaigbede/rodiumai-python-sdk/issues
Author-email: RodiumAI <dev@rodiumai.io>
License: MIT
License-File: LICENSE
Keywords: africa,ai,api,llm,openai-compatible
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.9
Requires-Dist: httpx>=0.25.0
Provides-Extra: dev
Requires-Dist: bandit>=1.7; extra == 'dev'
Requires-Dist: black>=23.0; extra == 'dev'
Requires-Dist: flake8>=6.0; extra == 'dev'
Requires-Dist: isort>=5.0; extra == 'dev'
Requires-Dist: mypy>=1.0; extra == 'dev'
Requires-Dist: pip-audit>=2.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: respx>=0.21.0; extra == 'dev'
Description-Content-Type: text/markdown

# RodiumAI Python SDK

[![PyPI version](https://img.shields.io/pypi/v/rodiumai)](https://pypi.org/project/rodiumai/)
[![Python versions](https://img.shields.io/pypi/pyversions/rodiumai)](https://pypi.org/project/rodiumai/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Unified AI API for Africa — access leading AI models through one SDK with local payment methods.

> **OpenAI drop-in replacement** — migrate by changing only `api_key` and `base_url`.

## Installation

```bash
pip install rodiumai
```

## Quick Start

```python
from rodiumai import RodiumAI
import os

client = RodiumAI(api_key=os.getenv("RODIUMAI_API_KEY"))

# Chat completion
response = client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)

# Streaming
for chunk in client.chat.completions.create(
    model="auto",
    messages=[{"role": "user", "content": "Hello!"}],
    stream=True,
):
    print(chunk.choices[0].delta.content or "", end="")
```

## Migration from OpenAI

```python
# Before (OpenAI)
from openai import OpenAI
client = OpenAI(api_key="sk-...")

# After (RodiumAI)
from rodiumai import RodiumAI
client = RodiumAI(api_key="rdk-...")
```

That's it. Same methods, same parameters, same response types.

## Features

- **Chat Completions** — Standard & streaming (SSE)
- **Embeddings** — Single & batch text input
- **Image Generation** — Text-to-image with size/quality options
- **Audio** — Speech-to-text & text-to-speech
- **Video** — Future-ready stub
- **Retry Logic** — Automatic with exponential backoff
- **Error Hierarchy** — 8 typed errors with fix suggestions
- **Observability** — Structured JSON logging, usage stats, alerts
- **Security** — API key masked everywhere, HTTPS enforced

## Documentation

Full documentation at [docs.rodiumai.io](https://docs.rodiumai.io).

## Development

```bash
git clone https://github.com/RodiumAI/rodiumai-python.git
cd rodiumai-python
pip install -e ".[dev]"
pytest
```

## License

MIT
