Skip to main content

The Nigerian AI inference gateway

Project description

ConfamNode

The Nigerian AI inference gateway. Access frontier AI models.


Installation

Using pip

pip install confamnode

Using uv

uv add confamnode

Using virtualenv

# Create virtual environment
python -m venv venv

# Activate — Linux/Mac
source venv/bin/activate

# Activate — Windows
venv\Scripts\activate

# Install
pip install confamnode

Using uv with virtual environment

# Create project
uv init my-project
cd my-project

# Add confamnode
uv add confamnode

# Run your script
uv run python main.py

Using conda

# Create environment
conda create -n my-project python=3.10
conda activate my-project

# Install
pip install confamnode

Quick Start

from confamnode import ConfamNode

client = ConfamNode(api_key="confam-sk-xxx")

ansa = client.gist(
    model="confam-speed",
    messages="How you dey?"
)

print(ansa.text)
print(f"Cost:   ₦{ansa.cost.naira:.6f}")
print(f"Tokens: {ansa.usage.total_tokens}")
print(f"ID:     {ansa.id}")

Streaming

from confamnode import ConfamNode

client = ConfamNode(api_key="confam-sk-xxx")

stream = client.gist(
    model="confam-speed",
    messages="Wetin be the capital of 9ja?",
    stream=True
)

# Print tokens as they arrive
for yarn in stream:
    content = yarn.choices[0].delta.content
    if content:
        print(content, end="", flush=True)

# Get full Ansa after stream completes
ansa = stream.get_ansa()
print(f"\nModel:  {ansa.model}")
print(f"Tokens: {ansa.usage.total_tokens}")
print(f"Cost:   ₦{ansa.cost.naira:.6f}")
if ansa.cost.dollars:
    print(f"${ansa.cost.dollars:.8f}")
print(f"ID: {ansa.id}")

The Ansa Response Object

Every gist() call returns an Ansa object:

ansa = client.gist(model="confam-speed", messages="How far?")

# Response
ansa.text               # response text
ansa.model              # model that served the request
ansa.reasoning          # thinking trace (reasoning models only)
ansa.tools              # tool calls (agent models only)
ansa.citations          # citations (search models only)
ansa.finish_reason      # why generation stopped

# Usage
ansa.usage.prompt_tokens      # input tokens used
ansa.usage.completion_tokens  # output tokens used
ansa.usage.total_tokens       # total tokens used

# Cost — Naira first
ansa.cost.naira         # total cost in Naira ← primary
ansa.cost.naira_input   # input cost in Naira
ansa.cost.naira_output  # output cost in Naira
ansa.cost.dollars       # cost in USD (if available)

# Identity
ansa.is_local                # True — runs on Nigerian hardware
ansa.is_ngn_data_residency   # True — data never leaves Nigeria
ansa.id                      # unique request ID (confam-xxxx-xxxx)
ansa.raw                     # original LiteLLM response

Models

Free Tier

Model Description Price
confam-lite Light text and general chat Free
confam-speed Fast, high quality responses Free
confam-reasoning Standard reasoning and analysis Free

Paid Tier

Model Description Input ₦/1M Output ₦/1M Input ₦/1K Output ₦/1K
confam-intelligence General smart tasks, 1M context ₦596 ₦3,571 ₦0.596 ₦3.571
confam-deep-reasoning Complex thinking, multi-step analysis ₦234 ₦468 ₦0.234 ₦0.468
confam-code Coding assistance, 1M context ₦234 ₦468 ₦0.234 ₦0.468

Local Models — Nigeria Data Residency

Model Description Input ₦/1M Output ₦/1M Input ₦/1K Output ₦/1K
confam-nano Qwen3.5 4B on Jetson Orin Nano ₦500 ₦1,500 ₦0.500 ₦1.500

Runs entirely on Nigerian hardware. Data never transmitted abroad.

Data never leaves Nigeria. Ideal for banks, fintechs, hospitals, law firms, and government agencies.

More models coming soon. Contact hello@confamnode.com for early access.


Pricing

All prices are in Nigerian Naira (₦). No USD. No conversion needed.

Tier How it works
Free Use immediately. No wallet needed. Shared capacity.
Paid Contact us to get access. Pay in Naira. No subscription. No expiry.

Currently in private beta. To get API access: hello@confamnode.com


Rate Limits

Rate limits vary by plan. Contact hello@confamnode.com.

  • Free tier — shared capacity with lower limits
  • Paid tier — dedicated higher limits
  • confam-nano — limited capacity, queue-based

System Message

ConfamNode adds a default system message to every request giving the model a Nigerian identity and context. This is standard behaviour across all LLM providers and is counted in prompt_tokens.

# Use ConfamNode default identity (default)
ansa = client.gist(
    model="confam-speed",
    messages="Who are you?"
)
# "I am ConfamNode, Nigeria's AI inference gateway..."

# Override with your own system message
ansa = client.gist(
    model="confam-speed",
    messages="Who are you?",
    system="You are a helpful customer service agent for Konga."
)

# Disable system message entirely
ansa = client.gist(
    model="confam-speed",
    messages="Who you be?",
    system=None
)

Reasoning Models

Enable extended thinking for complex problems:

ansa = client.gist(
    model="confam-reasoning",
    messages="One trader buy goods for ₦50,000 sell am for ₦75,000. After e pay ₦5,000 for transport and ₦3,000 for market, wetin be the real profit? Show how you calculate am.",
    # Explicit reasoning control
    allowed_openai_params=["reasoning_effort"],
    rreasoning_effort={"effort": "low", "summary": "detailed"} # effort can be "low", "mid", "high", or "xhigh". summary can be "detailed", or "concise"
)

print(ansa.reasoning)   # thinking trace
print(ansa.text)        # final answer

Also available on confam-deep-reasoning for more complex multi-step problems:

ansa = client.gist(
    model="confam-deep-reasoning",
    messages="Analyse the financial risk of a Nigerian fintech expanding to Ghana...",
    # Explicit reasoning control
    allowed_openai_params=["reasoning_effort"],
    rreasoning_effort={"effort": "low", "summary": "detailed"} # effort can be "low", "mid", "high", or "xhigh". summary can be "detailed", or "concise"
)

print(ansa.reasoning)   # full thinking trace
print(ansa.text)        # final analysis

RAG (Retrieval-Augmented Generation)

Best models for RAG

Model Why Context
confam-intelligence General RAG, reliable, long context 1M tokens
confam-code Code search, documentation RAG 1M tokens
confam-deep-reasoning Complex RAG, multi-hop reasoning 1M tokens

Data Residency

Nigerian businesses handling sensitive data can use local models that run entirely on Nigerian hardware — data is never transmitted abroad:

ansa = client.gist(
    model="confam-nano",
    messages="Analyse this sensitive document..."
)

print(ansa.is_local)                 # True — runs on Nigerian hardware
print(ansa.is_ngn_data_residency)    # True — data never leaves Nigeria
print(ansa.text)

Ideal for:

  • Nigerian banks and fintechs
  • Healthcare companies
  • Law firms
  • Government agencies
  • Any business with strict data residency requirements

Environment Variable

export CONFAMNODE_API_KEY="confam-sk-xxx"
# No need to pass api_key explicitly
client = ConfamNode()

Custom Base URL

For enterprise clients running ConfamNode on private infrastructure:

client = ConfamNode(
    api_key="confam-sk-xxx",
    base_url="http://your-private-server:4000/v1"
)

Error Handling

from confamnode import (
    ConfamAuthError,
    ConfamRateLimitError,
    ConfamModelError,
    ConfamNodeError
)

try:
    ansa = client.gist(
        model="confam-speed",
        messages="How you dey?"
    )
except ConfamAuthError:
    print("Check your API key")
except ConfamRateLimitError:
    print("You don reach your limit. Contact hello@confamnode.com")
except ConfamModelError:
    print("Invalid model name")
except ConfamNodeError as e:
    print(f"Something went wrong: {e}")

Private AI Deployment

Need Data-residential private AI on your own infrastructure?

JoTeq the First offers:

  • On-premise deployment on Jetson devices and GPUs
  • RTX 3090/4090 bare metal setup
  • RAG pipelines and fine-tuning
  • Dedicated hosted models
  • SSH remote deployment

Contact: hello@confamnode.com


Links


License

Apache 2.0


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

confamnode-0.1.2.tar.gz (185.0 kB view details)

Uploaded Source

Built Distribution

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

confamnode-0.1.2-py3-none-any.whl (13.8 kB view details)

Uploaded Python 3

File details

Details for the file confamnode-0.1.2.tar.gz.

File metadata

  • Download URL: confamnode-0.1.2.tar.gz
  • Upload date:
  • Size: 185.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for confamnode-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d9a08083c394fdd056667becf0183cb4c19066db45e5dbde8843fc5f149878cb
MD5 51d346eb8be69fd91732b417e9850b21
BLAKE2b-256 312c8831db448d6ec76105f062a5d46ac614e4e4942c8483f650359bb0c68b54

See more details on using hashes here.

File details

Details for the file confamnode-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: confamnode-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 13.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.13

File hashes

Hashes for confamnode-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d1af31987de6b742e1ebde4cb0f7dbfc3314a135f85775d579d1f280d1d20705
MD5 de654f5b92b64136497f8401c537f51b
BLAKE2b-256 7071ae4ae74dd43a7b400a733448d186dc9f10c7bfe2848a707aed411af382dc

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