Azure OpenAI Alternative Africa: Fikra API Integration Guide
Introduction
Azure OpenAI Service is a cloud offering from Microsoft that provides access to OpenAI models through the Azure portal. It is an external provider and is not hosted, resold, or provided by Fikra API.
Fikra API is a separate service that offers an OpenAI-style chat-completions endpoint. Developers can use Fikra API as an alternative integration point for applications requiring OpenAI-compatible request and response structures, specifically using Fikra's own model aliases.
Comparison: Azure OpenAI Service vs. Fikra API
| Feature | Azure OpenAI Service | Fikra API |
|---|---|---|
| Integration Style | Azure SDK or REST API with Azure-specific headers. | OpenAI-style REST API. |
| Authentication | Azure AD tokens or API keys with Azure-specific headers. | Authorization: Bearer fk_live_... header. |
| Endpoint Compatibility | Azure-specific endpoints. | OpenAI-compatible /chat/completions endpoint. |
| Payment/Access | Azure subscription and billing. | Fikra dashboard, API keys, and Paystack billing (M-Pesa/cards). |
| Model Naming | OpenAI model names (e.g., gpt-4o). |
Fikra aliases (e.g., fikra-flash, fikra-pro-20b). |
Python Example: Using Fikra API with OpenAI SDK
You can use the standard OpenAI Python SDK to interact with Fikra API by specifying the Fikra base URL and API key. Ensure you have installed the openai package.
import os
from openai import OpenAI
# Initialize the client with Fikra's base URL and API key
client = OpenAI(
base_url="https://api.fikraapi.co.ke/v1",
api_key=os.getenv("FIKRA_API_KEY")
)
# Make a chat completion request using a Fikra model alias
response = client.chat.completions.create(
model="fikra-flash",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello, how are you?"}
]
)
print(response.choices[0].message.content)
When Fikra API is a Fit
Fikra API may be a suitable choice for developers who:
- Need an OpenAI-compatible endpoint for existing codebases that use the OpenAI SDK.
- Prefer a local or regional API provider with Paystack billing integration.
- Want to use Fikra's specific model aliases (e.g.,
fikra-flash,fikra-pro-20b) for their applications. - Require a straightforward authentication pattern using a Bearer token.
Verify Before Production
Before deploying Fikra API in a production environment, please:
- Check the Model Registry: Confirm the availability and specific capabilities of the Fikra model aliases you intend to use.
- Review Rate Limits: Note that current public limits are 30 RPM for unverified accounts and 100 RPM for trusted accounts. Verify your account status and limits in the Fikra dashboard.
- Test Streaming: If you plan to use
stream: true, test the Server-Sent Events (SSE) implementation in your application. - Confirm Billing: Ensure your Fikra account has sufficient token credits and that your Paystack billing setup is correctly configured.
- Consult Documentation: Refer to the official Fikra API documentation at https://fikraapi.co.ke for the most up-to-date information on endpoints, models, and account management.
James Miano
CTO & ML Engineer at Lacesse Ventures. James specializes in low-overhead LLM quantization processes, custom ternary weights architectures, and localized server optimization.
Stop paying for overpriced round-trip latency
Why route queries over Western servers when you can use low-overhead hardware located in Nairobi? Save 87% on your monthly inference spend. No minimum credit limits. M-Pesa ready.