Skip to main content

RodiumAI SDK — Unified AI API for Africa

Project description

RodiumAI Python SDK

PyPI version Python versions License: 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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rodiumai-0.1.0.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rodiumai-0.1.0-py3-none-any.whl (14.9 kB view details)

Uploaded Python 3

File details

Details for the file rodiumai-0.1.0.tar.gz.

File metadata

  • Download URL: rodiumai-0.1.0.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for rodiumai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4cf9607e212b59f53e6a4661e4878ffe78ace64664dca9fac405b229031f52bd
MD5 cd2a02b232b1fb0989d12e9f84f2c137
BLAKE2b-256 c4d135a686640a086461d26ce5853cd9874a6b6c9acddac9f9329a35c7907f42

See more details on using hashes here.

File details

Details for the file rodiumai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: rodiumai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for rodiumai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b813a4193239c07dc2c509a489ad4333a47c6990d9fed48105edb946e3679942
MD5 d6ffd3ede1d41e864e8ed339cbed1081
BLAKE2b-256 4b85cd9dce513c545ea6490b7dabfcb30645a3a187a32f5c2f701ef0547868f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page