Fikra API Payment Methods and Token-Credit Wallet
Understanding Fikra API Billing
Fikra API operates on a token-credit wallet system. This means you purchase credits in advance, and your API usage deducts from this balance. The platform integrates with Paystack for billing, and the public website states that M-Pesa and card payments are accepted.
Note on "Groq API without credit card"
The keyword "Groq API without credit card" refers to an external provider (Groq) and is not a supported payment method or feature of Fikra API. Fikra does not serve Groq models. If you are looking for specific payment options like "no credit card" for Fikra, you should confirm current availability directly with Fikra, as the public documentation only verifies M-Pesa and card access via Paystack.
What is a Token-Credit Wallet?
A token-credit wallet is a prepaid balance system. Instead of paying per request or via a recurring subscription, you top up your account with credits. Each API call consumes tokens, which are deducted from your wallet. This model provides predictable costs and immediate access to the API once funded.
Account and Top-Up Flow
- Create an Account: Sign up for a Fikra account through the Fikra dashboard.
- Generate API Key: Create an API key (starting with
fk_live_...) in the dashboard. - Top Up Wallet: Use the Paystack integration to add credits. The public site indicates M-Pesa and card payments are accepted.
- Verify Balance: Check your dashboard to ensure credits have been added.
Monitoring Balance and Handling HTTP 402
Developers should monitor their token-credit balance to avoid service interruptions. If your balance is insufficient to cover a request, the API will return an HTTP 402 (Payment Required) status code.
Best Practices: - Check Balance: Regularly query your dashboard or implement a balance-checking mechanism in your application. - Handle 402 Errors: Implement retry logic or user notifications when a 402 error is received. Do not assume the request will succeed on retry without topping up the wallet. - Alerts: Set up alerts for low balance thresholds to prevent unexpected downtime.
Security Advice
- Never Expose API Keys in Browser Code: Fikra API keys (e.g.,
fk_live_...) must be kept secret. Do not include them in client-side JavaScript, HTML, or any publicly accessible code. Use environment variables (e.g.,FIKRA_API_KEY) on your server to store and manage keys. - Use Server-Side Proxies: If your application is client-side, route API requests through a secure backend that holds the API key and forwards requests to Fikra.
Code Example: Secure API Usage
import os
import requests
# Load API key from environment variable
api_key = os.getenv("FIKRA_API_KEY")
if not api_key:
raise ValueError("FIKRA_API_KEY environment variable is not set")
base_url = "https://api.fikraapi.co.ke/v1"
endpoint = f"{base_url}/chat/completions"
headers = {
"Authorization": f"Bearer {api_key}",
"Content-Type": "application/json"
}
payload = {
"model": "fikra-flash",
"messages": [
{"role": "user", "content": "Hello, Fikra!"}
]
}
try:
response = requests.post(endpoint, headers=headers, json=payload)
if response.status_code == 402:
print("Error: Insufficient credits. Please top up your wallet.")
elif response.status_code == 200:
print(response.json())
else:
print(f"Error: {response.status_code} - {response.text}")
except Exception as e:
print(f"Request failed: {e}")
Important Notes
- Payment Methods: Only M-Pesa and card payments are publicly verified. Do not assume other methods (e.g., bank transfer, crypto) are available without confirmation from Fikra.
- External Providers: Fikra does not offer Groq, OpenAI, or other third-party models. If you need those, you must use their respective APIs and billing systems.
- Rate Limits: Unverified accounts are limited to 30 RPM, and trusted accounts to 100 RPM. Check the model registry for current availability and limits.
For the most accurate and up-to-date information on payment options, pricing, and account status, always 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.