Fikra API solutions · all how-tos

Build a customer support bot using Fikra API credit

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

Fikra API is an OpenAI-compatible AI inference API designed for developers and growing AI teams who need production inference without a credit-card gate. You can build a customer support bot by sending chat messages to a single OpenAI-style endpoint. The endpoint is https://api.fikraapi.co.ke/v1/chat/completions, and each request is billed to your token-credit wallet. Credits are purchased with M-Pesa or card top-ups via Paystack, or with x402 USDC on Base for agent-based workflows.

Prerequisites

Step-by-step

  1. Create a client pointing to the Fikra API base URL and your API key.

  2. Prepare a messages list that includes a system prompt defining your support bot’s behavior and a user message with the customer’s question.

  3. Send the messages to the chat completions endpoint using one of the available models.

  4. Read the assistant reply from response.choices[0].message.content and route it back to the customer through your frontend channel.

Example code:

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.fikraapi.co.ke/v1",
    api_key=os.environ["FIKRA_API_KEY"],
)

response = client.chat.completions.create(
    model="deepseek-v4-flash-0731",
    messages=[
        {
            "role": "system",
            "content": "You are a concise customer support assistant.",
        },
        {
            "role": "user",
            "content": "How do I track my order?",
        },
    ],
)

print(response.choices[0].message.content)

The same base_url and model name can be used from any tool that accepts an OpenAI-compatible base URL, such as LangChain, Vercel AI SDK, Cursor, and CrewAI.

Verify it works

Run the script above and confirm that a printed response is generated. The request should complete without error, and the output should be a plain-text assistant message. Note that streaming is supported, so you can also enable stream=True to deliver tokens incrementally.

Costs

Fikra API bills per 1 million tokens. The cost depends on the model you select:

Model Input price (USD / 1M tokens) Output price (USD / 1M tokens)
deepseek-v4-flash-0731 0.09 0.15
deepseek-v4.1-flash 0.25 0.80
deepseek-v4.1-flash-1017 0.30 0.85
fikra-auto 0.40 0.40
fikra-auto-pro 6.00 12.00
fikra-code-35b 1.00 1.00

These charges are deducted from your token-credit wallet, which you top up before use.

Common errors

usagestatusdashboard