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.2.0.tar.gz (23.2 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.2.0-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

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

Hashes for rodiumai-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d3883897572883efca8aaa9c51c03e1223eac1ae27e28f942d5b3b7e31303e9c
MD5 199e1d5faf17d32d35b583ce4c88702f
BLAKE2b-256 b1c8aba57990c8305cb9ba0f815d740483af13dc2c6bead72e970d7c6e9d961b

See more details on using hashes here.

Provenance

The following attestation bundles were made for rodiumai-0.2.0.tar.gz:

Publisher: publish.yml on jeanpierreaigbede/rodiumai-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for rodiumai-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 719dba1483c2e8737a0ae86265a701f3b1c14fe9ea6ae8ea5fa272c8ddb14ed5
MD5 91a923bbfe9b70a9b17f86c332c1e0a7
BLAKE2b-256 d7f320241e5dc4a31510093fee887a667073da61131b31e59b53aaf11685dfb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for rodiumai-0.2.0-py3-none-any.whl:

Publisher: publish.yml on jeanpierreaigbede/rodiumai-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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