RodiumAI SDK — Unified AI API for Africa
Project description
RodiumAI Python SDK
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_keyandbase_url.
Installation
pip install rodiumai
Quick Start
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
# 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.
Development
git clone https://github.com/RodiumAI/rodiumai-python.git
cd rodiumai-python
pip install -e ".[dev]"
pytest
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rodiumai-0.2.0.tar.gz.
File metadata
- Download URL: rodiumai-0.2.0.tar.gz
- Upload date:
- Size: 23.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3883897572883efca8aaa9c51c03e1223eac1ae27e28f942d5b3b7e31303e9c
|
|
| MD5 |
199e1d5faf17d32d35b583ce4c88702f
|
|
| BLAKE2b-256 |
b1c8aba57990c8305cb9ba0f815d740483af13dc2c6bead72e970d7c6e9d961b
|
Provenance
The following attestation bundles were made for rodiumai-0.2.0.tar.gz:
Publisher:
publish.yml on jeanpierreaigbede/rodiumai-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rodiumai-0.2.0.tar.gz -
Subject digest:
d3883897572883efca8aaa9c51c03e1223eac1ae27e28f942d5b3b7e31303e9c - Sigstore transparency entry: 1727954675
- Sigstore integration time:
-
Permalink:
jeanpierreaigbede/rodiumai-python-sdk@ec036375fdc3a391a9966be7c9d6e5049f4bece6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/jeanpierreaigbede
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ec036375fdc3a391a9966be7c9d6e5049f4bece6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file rodiumai-0.2.0-py3-none-any.whl.
File metadata
- Download URL: rodiumai-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
719dba1483c2e8737a0ae86265a701f3b1c14fe9ea6ae8ea5fa272c8ddb14ed5
|
|
| MD5 |
91a923bbfe9b70a9b17f86c332c1e0a7
|
|
| BLAKE2b-256 |
d7f320241e5dc4a31510093fee887a667073da61131b31e59b53aaf11685dfb6
|
Provenance
The following attestation bundles were made for rodiumai-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on jeanpierreaigbede/rodiumai-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rodiumai-0.2.0-py3-none-any.whl -
Subject digest:
719dba1483c2e8737a0ae86265a701f3b1c14fe9ea6ae8ea5fa272c8ddb14ed5 - Sigstore transparency entry: 1727954759
- Sigstore integration time:
-
Permalink:
jeanpierreaigbede/rodiumai-python-sdk@ec036375fdc3a391a9966be7c9d6e5049f4bece6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/jeanpierreaigbede
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ec036375fdc3a391a9966be7c9d6e5049f4bece6 -
Trigger Event:
push
-
Statement type: