How-to

Route Cheap and Valuable Requests to Different Fikra Models

Last updated 2026-11-25. Facts are checked against the live registry.

Overview

Fikra API is an OpenAI-compatible AI inference API for developers and growing AI teams. It exposes chat models behind one https://api.fikraapi.co.ke/v1 endpoint, so you can send low-cost requests to an affordable model and reserve premium models for higher-value work. This page shows how to build a simple routing layer with the OpenAI Python SDK.

Prerequisites

  • A Fikra API key, kept server-side (use the Authorization: Bearer <Fikra API key> header)
  • The OpenAI Python SDK installed: pip install openai
  • The FIKRA_API_KEY environment variable set
  • A funded token-credit wallet (top up via M-Pesa, card through Paystack, or x402 USDC on Base for agents)

Step-by-step

1

Live prices -> · Agent account -> · SDKs ->