Fikra API solutions · all how-tos

Point the OpenAI SDK at the Fikra API base URL

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. You point your existing OpenAI client at a different base URL , https://api.fikraapi.co.ke/v1 , and keep using OpenAI-style chat-completions requests and responses. This page covers changing the base URL only; no other code changes are required for compatible calls.

It is built for developers and growing AI teams who need production inference without a credit-card gate, and it runs chat and embedding models behind one OpenAI-style endpoint with billing in USD or KES.

Prerequisites

Store the key in an environment variable and keep it server-side:

export FIKRA_API_KEY="your-fikra-api-key"

Step-by-step

  1. Set the base URL on the client. Requests then go to POST https://api.fikraapi.co.ke/v1/chat/completions.
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.fikraapi.co.ke/v1",
    api_key=os.environ["FIKRA_API_KEY"],
)
  1. Send a chat-completions request using a model from the pricing table.
response = client.chat.completions.create(
    model="deepseek-v4-flash-0731",
    messages=[
        {"role": "user", "content": "Summarise what this gateway does in one sentence."}
    ],
)

print(response.choices[0].message.content)
  1. Authenticate. The client sends Authorization: Bearer <Fikra API key> from FIKRA_API_KEY. Do not hard-code the key in source or commit it; keep secrets server-side in your examples and applications.

  2. To stream, keep the same base URL and pass stream=True on the same endpoint. Streaming is supported.

  3. If you use a framework or tool that accepts an OpenAI-compatible base URL (the OpenAI SDK, LangChain, Vercel AI SDK, Cursor, CrewAI and more), set its base URL to https://api.fikraapi.co.ke/v1 and its API key to your Fikra API key.

Verify it works

Run the request from step 2. A successful call returns a chat-completions shaped response and prints the assistant message text.

If it fails, check in this order:

Costs

Billing is per token, in USD per 1M tokens, drawn from a token-credit wallet. Top up by M-Pesa or card via Paystack; agent workloads can use x402 USDC on Base.

Model Input Output
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

Prices are USD per 1M tokens. Pricing starts at 0.09 input / 0.15 output. If a model or price you need is not listed here, check the pricing page.

Rate limits are 30 requests/min while unverified and 100 requests/min once trusted.

Common errors

Last updated: 2026-10-18

usagestatusdashboard