By Fikra DevRel • 4 min read

Paying for AI Inference with Mobile Money: A Guide for African Developers

Paying for AI Inference with Mobile Money: A Guide for African Developers

Paying for AI Inference with Mobile Money: A Guide for African Developers

For developers building in Africa, access to global AI models has often been hindered by payment friction. Traditional APIs require international credit cards or complex billing setups that are inaccessible to many local businesses and startups. Fikra API solves this by acting as a bridge that accepts Buy LLM tokens with mobile money natively, while providing OpenAI-compatible endpoints that require zero code rewrites.

Why Fikra API?

  • Native Mobile Money Support: Pay for AI inference tokens directly via M-Pesa, Airtel Money, or other local mobile money providers.
  • OpenAI-Compatible Endpoints: Use the same SDKs and code you already have for OpenAI. No changes needed.
  • Zero Code Rewrites: Swap the base URL and API key, and you’re live.
  • Local Infrastructure: Hosted at fikraapi.co.ke with a base URL at api.fikraapi.co.ke/v1 for low-latency access across the region.

Getting Started

1. Create an Account

Sign up at fikraapi.co.ke and verify your mobile money number.

2. Buy LLM Tokens with Mobile Money

  • Navigate to the Dashboard > Billing > Buy Tokens.
  • Select the amount of tokens you wish to purchase.
  • Choose your mobile money provider (e.g., M-Pesa).
  • Confirm the payment via your phone. Tokens are credited instantly.

3. Get Your API Key

  • Go to Dashboard > API Keys.
  • Generate a new API key. This key will be used to authenticate your requests.

Making Your First Request

Since Fikra API is OpenAI-compatible, you can use the official OpenAI SDK or any HTTP client. Below is an example using Python.

Python Example

from openai import OpenAI

# Initialize the client with Fikra API's base URL and your API key
client = OpenAI(
    base_url="https://api.fikraapi.co.ke/v1",
    api_key="your_fikra_api_key"
)

# Make a chat completion request
response = client.chat.completions.create(
    model="gpt-3.5-turbo",  # Or any supported model
    messages=[
        {"role": "system", "content": "You are a helpful assistant."},
        {"role": "user", "content": "Hello, how are you?"}
    ]
)

print(response.choices[0].message.content)

cURL Example

curl https://api.fikraapi.co.ke/v1/chat/completions \
  -H "Authorization: Bearer your_fikra_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gpt-3.5-turbo",
    "messages": [
      {"role": "system", "content": "You are a helpful assistant."},
      {"role": "user", "content": "Hello, how are you?"}
    ]
  }'

Key Benefits for African Developers

  • No Credit Card Required: Pay with the mobile money you already use.
  • Instant Token Credits: No waiting for billing cycles or invoices.
  • Seamless Integration: Your existing OpenAI code works out of the box.
  • Local Support: Based in Kenya, with a focus on serving the African tech ecosystem.

Troubleshooting

  • Payment Not Reflected: Ensure your mobile money number is correctly linked to your Fikra account. Check your SMS for confirmation.
  • 401 Unauthorized: Verify that your API key is correct and active.
  • 404 Not Found: Ensure you are using the correct base URL: https://api.fikraapi.co.ke/v1.

Conclusion

Fikra API removes the payment barrier for African developers, allowing you to build and deploy AI-powered applications using local payment methods. With OpenAI-compatible endpoints and zero code rewrites, you can start building today.

Ready to get started? Visit fikraapi.co.ke to create your account and buy your first LLM tokens with mobile money.


JM
// The Founder

James Miano

CTO & ML Engineer at Lacesse Ventures. James specializes in low-overhead LLM quantization processes, custom ternary weights architectures, and localized server optimization.

Stop paying for overpriced round-trip latency

Why route queries over Western servers when you can use low-overhead hardware located in Nairobi? Save 87% on your monthly inference spend. No minimum credit limits. M-Pesa ready.

usagestatusdashboard