Fikra API solutions · all how-tos

How to choose a model on Fikra API: long-context vs reasoning workloads

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 inference API. You send chat-completions requests to one base URL and choose a model per request, so you can compare candidate models on your own prompts before committing a workload to one of them. This page shows how to run that comparison with the OpenAI Python SDK and how to read the cost differences between the models listed here.

This page covers only the models and prices published in the Fikra API fact block. For any model name you have seen elsewhere , including long-context or reasoning-labelled variants , check the pricing page for current availability, context limits, and pricing before you build around it.

Prerequisites

Step-by-step

  1. Set the base URL and key. Every request uses https://api.fikraapi.co.ke/v1 and the header Authorization: Bearer <Fikra API key>. The SDK reads both from the client object:
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.fikraapi.co.ke/v1",
    api_key=os.environ["FIKRA_API_KEY"],
)
  1. Pick your candidate models. The chat endpoint is POST https://api.fikraapi.co.ke/v1/chat/completions. The models published with pricing are:

  2. deepseek-v4-flash-0731

  3. deepseek-v4.1-flash
  4. deepseek-v4.1-flash-1017
  5. fikra-auto
  6. fikra-auto-pro
  7. fikra-code-35b

If your workload depends on a specific context window or on a reasoning mode, check the pricing page to confirm which of these supports it. Do not assume it from the model name.

  1. Run the same prompt through each candidate. Keep the prompt, system message, and parameters identical so the only variable is the model:
candidates = [
    "deepseek-v4-flash-0731",
    "deepseek-v4.1-flash",
    "deepseek-v4.1-flash-1017",
]

prompt = "Your representative task goes here."

for model in candidates:
    response = client.chat.completions.create(
        model=model,
        messages=[{"role": "user", "content": prompt}],
    )
    print(model)
    print(response.choices[0].message.content)
    print("-" * 40)
  1. Score the outputs yourself. Compare the responses against your own acceptance criteria for the job , for example, how much of a long input the answer actually uses, or how well the answer holds up on multi-step problems. Fikra API does not publish benchmark results, so the decision has to come from your own evaluation data.

  2. Switch to streaming if you need incremental output. Streaming is supported on the OpenAI-style chat-completions response. Add stream=True to the same call and iterate over chunks.

  3. Fix the model in your application config. Once you have a winner, set it as a single configuration value rather than editing call sites, so you can move a workload to a different model later without a code change.

Verify it works

Send one request with the model you selected and confirm you get a normal chat-completions response object back:

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.1-flash",
    messages=[{"role": "user", "content": "Reply with the single word: ready"}],
)

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

A returned message means your base URL, key, and model name are all accepted. Anything else , see below.

Costs

Pricing is quoted in USD per 1M tokens, split between input and output.

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

Pricing starts at 0.09 USD per 1M input tokens and 0.15 USD per 1M output tokens.

Billing runs through a token-credit wallet. You top up by M-Pesa or card via Paystack, in USD or KES, and agents can pay with x402 USDC on Base. Because input and output are priced separately, a model that is cheaper per input token is not automatically cheaper for output-heavy work , check the pricing page before you commit to a high-volume workload.

Common errors

Last updated: 2026-10-18

usagestatusdashboard