Logo Lanfrica

ronikisystems/fikra-python

Domain:

natural language processingdigital infrastructure

Record type:

softwaretools
Creator:
ron
Host:
Python quickstart and examples for Fikra API : the OpenAI-compatible AI inference API built for African developers. # fikra-python Python quickstart and examples for Fikra API - the OpenAI-compatible AI inference API built for African developers. --- ## ⚡ Don't want to write code? (5-Minute Deploy) If you just need an AI chatbot for your business and don't want to host the code yourself, **you do not need this repository.** Through our partnership with **Lacesse Pages**, you can instantly deploy a fully-hosted, custom AI agent in under 5 minutes directly from the Fikra Dashboard. 👉 **Deploy a Hosted Bot on Fikra API** - Fikra Examples : Example use cases using Fikra API Fikra API gives developers across East Africa and beyond access to powerful AI inference without the usual barriers - no Stripe account required, no $20 minimums, no VPN. Pay with M-Pesa and local payment apps. Start from KES 130. Get 2 million tokens per dollar. This repo contains everything you need to get started in under 5 minutes. --- ## Models | Model | Best for | |---|---| | `fikra-pro-120b` | Complex reasoning, long-form generation | | `fikra-pro-20b` | Balanced, best for most use cases | | `fikra-fast-8b` | Speed, multilingual, high-volume tasks | | `fikra-nano-1b` | Edge deployment *(coming soon)* | --- ## Quickstart ### 1. Get your API key Create a free account at fikraapi.co.ke. You get **2 million free tokens** on signup during the launch period - no card required. ### 2. Install the OpenAI SDK Fikra API is fully OpenAI-compatible. No new SDK to install. ```bash pip install openai ``` ### 3. Make your first call ```python import openai client = openai.OpenAI( base_url="api.fikraapi.co.ke", api_key="your_fikra_api_key" ) response = client.chat.completions.create( model="fikra-pro-20b", messages=[ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Write a haiku about writing code."} ] ) print(response.choices[0].message.content) ``` That's it. If you were already using OpenAI, the only change is `base_url`. --- ## Exampl …