Fikra API solutions · all how-tos

Serve Multiple Client Workloads Under One Fikra API Key

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

One Fikra API key can back multiple client workloads , different features, apps, or internal teams , as long as the key stays on your server and never appears in client-side code. Fikra API exposes an OpenAI-compatible endpoint, so your backend can act as a single gateway that injects the key and forwards requests to https://api.fikraapi.co.ke/v1. Because Fikra API keys are scoped and revocable, you can rotate or revoke one key without redistributing credentials to every consumer.

Prerequisites

Step-by-step

  1. Create or retrieve your Fikra API key from the dashboard.
  2. Store the key in the environment variable FIKRA_API_KEY on your server. Never embed it in client applications.
  3. On your backend, create an OpenAI client:
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.fikraapi.co.ke/v1",
    api_key=os.environ["FIKRA_API_KEY"],
)
  1. Write a wrapper that routes a given workload to a specific model. Use a model name from the Fikra API model list:
def run_workload(system_prompt, user_prompt, model="deepseek-v4-flash-0731"):
    completion = client.chat.completions.create(
        model=model,
        messages=[
            {"role": "system", "content": system_prompt},
            {"role": "user", "content": user_prompt},
        ],
    )
    return completion.choices[0].message.content
  1. Expose that wrapper to your clients through an internal HTTP endpoint or service. Clients send their prompts to your service, and your service calls Fikra API with the shared key.
  2. Assign each workload a model based on its needs. Available models and their prices are listed in the Costs section below.

Verify it works

Run a quick test on one workload:

print(run_workload(
    system_prompt="You are a helpful assistant.",
    user_prompt="Say hello.",
))

If the request succeeds, your one API key is serving that workload. Add other workloads by calling run_workload with different messages and model names.

Costs

Billing is per token and paid through your Fikra token-credit wallet. Prices are in USD per 1M tokens:

Model Input (USD / 1M tokens) Output (USD / 1M tokens)
deepseek-v4-flash-0731 0.09 0.15
deepseek-v4.1-flash 0.25 0.8
deepseek-v4.1-flash-1017 0.3 0.85
fikra-auto 0.4 0.4
fikra-auto-pro 6.0 12.0
fikra-code-35b 1.0 1.0

Total cost depends on the token volume generated by all workloads sharing your key.

Common errors

usagestatusdashboard