Pay for AI without USD: Fikra API Billing Guide
Fikra API supports local payment methods through its integrated billing system, allowing developers to access AI services without requiring US Dollar (USD) accounts or international credit cards.
Payment Methods and Wallet System
Fikra utilizes a token-credit wallet system. This means you do not pay per request in real-time; instead, you purchase a balance of credits (tokens) which are deducted as you use the API. This model provides predictable costs and prevents unexpected charges.
Supported Payment Methods: Fikra integrates with Paystack for billing. According to public documentation, the following methods are accepted: * M-Pesa: Mobile money payments. * Cards: Debit and credit cards.
Note: Specific availability of M-Pesa or card payments may vary by region. Always confirm current payment options in the Fikra dashboard before attempting a transaction.
Account and Top-Up Flow
- Create an Account: Sign up at fikraapi.co.ke and access the Fikra dashboard.
- Generate API Key: Create a new API key (starts with
fk_live_...) for your project. - Top Up Wallet: Navigate to the billing section in the dashboard. Select your preferred payment method (M-Pesa or Card) via the Paystack integration.
- Confirm Balance: After successful payment, your token-credit balance will update in the dashboard.
Monitoring Balance and Handling Errors
Developers should monitor their token-credit balance to avoid service interruptions. If your balance is insufficient to process a request, the API will return an HTTP 402 Payment Required status code.
Best Practices: * Check Balance: Regularly verify your remaining credits in the Fikra dashboard. * Handle 402 Errors: Implement error handling in your application to catch HTTP 402 responses. When this occurs, notify the user or administrator that the wallet needs to be topped up. * Set Alerts: Consider setting up internal alerts when your balance falls below a certain threshold to prevent downtime.
Security Advice
Never expose your Fikra API key in client-side code (e.g., JavaScript in the browser, mobile app front-end, or public repositories). API keys should only be used in secure server-side environments.
- Store Keys Securely: Use environment variables (e.g.,
FIKRA_API_KEY) on your server. - Use Server-Side Proxies: If you need to call the Fikra API from a frontend application, route requests through your own backend server, which holds the API key and forwards requests to
https://api.fikraapi.co.ke/v1.
Example: Server-Side Request (Python)
import os
import requests
# Load API key from environment variable
api_key = os.environ.get("FIKRA_API_KEY")
if not api_key:
raise ValueError("FIKRA_API_KEY environment variable is not set")
url = "https://api.fikraapi.co.ke/v1/chat/completions"
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
payload = {
"model": "fikra-flash",
"messages": [
{"role": "user", "content": "Hello, Fikra!"}
]
}
response = requests.post(url, headers=headers, json=payload)
if response.status_code == 402:
print("Error: Insufficient token-credit balance. Please top up your wallet.")
elif response.status_code == 200:
print(response.json())
else:
print(f"Error: {response.status_code} - {response.text}")
Important Notes
- No Direct Payment APIs: Fikra does not currently offer a public API for processing payments. All top-ups must be done through the Fikra dashboard.
- Exchange Rates and Minimums: Exact exchange rates, minimum deposit amounts, and subscription pricing are not publicly documented. Check the Fikra dashboard for current rates and requirements.
- Refunds: Refund policies are not publicly specified. Contact Fikra support for details on refund eligibility.
For the most up-to-date information on payment methods, pricing, and availability, please refer to the Fikra Dashboard or contact Fikra support directly.
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.