How to fund a Fikra API wallet with M-Pesa, from top-up to the KES charge and the first call.
M-Pesa pays in KES. Fikra quotes model prices in USD per 1M tokens, so the checkout shows the exact KES amount before you confirm.
from openai import OpenAI
client = OpenAI(base_url="https://api.fikraapi.co.ke/v1", api_key="fk_...")
response = client.chat.completions.create(
model="deepseek-v4-1-flash-economy-free",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)
Base URL: https://api.fikraapi.co.ke/v1. Default model: deepseek-v4-1-flash-economy-free.