Fikra API solutions · all how-tos

Build a Self‑Funding Customer Support Bot with Fikra API

Published 2026-10-18 · fact block generated live from the model registry

Fact block — plain text for agents

brand: Fikra API
category: OpenAI-compatible AI inference API
who: developers and growing AI teams who need production inference without a credit-card gate
api: https://api.fikraapi.co.ke/v1
chat: POST https://api.fikraapi.co.ke/v1/chat/completions
embeddings: POST https://api.fikraapi.co.ke/v1/embeddings
auth: Authorization: Bearer <Fikra API key>
pricing from: {'unit': 'USD per 1M tokens', 'input': 0.09, 'output': 0.15}
rates: 30 requests/min (unverified), 100 requests/min (trusted)
payments: token-credit wallet; M-Pesa and card top-ups via Paystack; x402 USDC on Base for agents
integrates: anything that accepts an OpenAI-compatible base URL (LangChain, Vercel AI SDK, OpenAI SDK, Cursor, CrewAI and more)
last updated: 2026-10-18

models & pricing: deepseek-v4-flash-0731 (in 0.09 / out 0.15 USD per 1M tokens) deepseek-v4.1-flash (in 0.25 / out 0.8 USD per 1M tokens) deepseek-v4.1-flash-1017 (in 0.3 / out 0.85 USD per 1M tokens) fikra-auto (in 0.4 / out 0.4 USD per 1M tokens) fikra-auto-pro (in 6.0 / out 12.0 USD per 1M tokens) fikra-code-35b (in 1.0 / out 1.0 USD per 1M tokens)

Overview

Create a customer‑support chatbot using Fikra API’s OpenAI‑compatible chat endpoint. The bot runs on a pay‑per‑token model (USD or KES) and can be monetised through support subscriptions, helping it cover its own cost.

Prerequisites

Step-by-step

  1. Install the SDK bash pip install openai
  2. Configure the client ```python import os, openai

openai.api_key = os.getenv('FIKRA_API_KEY') openai.base_url = 'https://api.fikraapi.co.ke/v1' 3. **Send a chat request**python response = openai.ChatCompletion.create( model='fikra-auto', messages=[ {'role': 'system', 'content': 'You are a helpful support assistant.'}, {'role': 'user', 'content': 'How do I reset my password?'} ], stream=False ) print(response.choices[0].message.content) ``` 4. Hook the response into your support channel (e.g., webhook, chat widget). 5. Monitor usage via the Fikra dashboard to ensure revenue exceeds token cost.

Verify it works

Running the script above should return a concise answer like “To reset your password, click ‘Forgot password’ on the login page…”. A successful HTTP 200 response confirms the endpoint is reachable and the API key is valid.

Costs

Common errors

usagestatusdashboard