Managing Fikra API Credits: Wallet, Billing, and Security
Understanding Fikra API Billing
Fikra API operates on a token-credit wallet system. When you make API requests, tokens are deducted from your account balance. The platform integrates with Paystack for billing, and the public site states that M-Pesa and cards are accepted payment methods.
Token-Credit Wallet
A token-credit wallet is a prepaid balance associated with your Fikra account. You top up this wallet using supported payment methods. Each API call consumes tokens based on the model used (e.g., fikra-flash, fikra-pro-20b). Your balance decreases as you use the API. If your balance reaches zero, API requests will fail.
Account and Top-Up Flow
- Access Dashboard: Log in to the Fikra dashboard at https://fikraapi.co.ke.
- Generate API Key: Create a new API key (format:
fk_live_...) for your application. - Top Up Wallet: Navigate to the billing section. Select a payment method (M-Pesa or card) via the Paystack integration. Follow the prompts to complete the transaction.
- Verify Balance: Confirm that your token-credit balance has updated in the dashboard.
Monitoring Balance and Handling HTTP 402
Developers should monitor their token-credit balance to avoid service interruptions. If your balance is insufficient, the API will return an HTTP 402 (Payment Required) status code.
Best Practices: - Check Balance: Regularly query your account balance via the dashboard or available API endpoints (if provided). - Handle 402 Errors: Implement error handling in your application to catch HTTP 402 responses. When detected, notify the user or administrator to top up the wallet. - Retry Logic: Do not automatically retry requests after a 402 error without first confirming that the balance has been replenished.
Security Advice
- Never Expose API Keys in Browser Code: Fikra API keys (e.g.,
fk_live_...) must be stored securely on your server or in environment variables (e.g.,FIKRA_API_KEY). Never include them in client-side JavaScript, HTML, or mobile app code, as this exposes them to theft. - Use Environment Variables: Load your API key from environment variables in your server-side code.
- Rotate Keys: If a key is compromised, revoke it in the Fikra dashboard and generate a new one.
Note on Payment Methods
While M-Pesa and cards are publicly stated as accepted methods, specific details such as minimum deposits, exchange rates, or country-specific availability should be confirmed with Fikra support or the dashboard before use. Do not assume direct payment API access or specific billing terms beyond the high-level integration described.
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.