By Fikra DevRel • 4 min read

DeepInfra Alternative: Fikra API Integration Guide

DeepInfra Alternative: Fikra API Integration Guide

Introduction

DeepInfra is an external cloud provider that offers inference services for various open-source and proprietary models. This page explains how developers can use Fikra API as an alternative integration point for OpenAI-style chat completions. Fikra API does not host, resell, or provide DeepInfra's models. Instead, it provides access to its own set of Fikra model aliases through a compatible API structure.

Comparison: DeepInfra vs. Fikra API

Feature DeepInfra (External Provider) Fikra API
Integration Style Provider-specific SDKs or REST API OpenAI-style chat-completions requests and responses
Authentication Provider-specific API keys Authorization: Bearer fk_live_...
Endpoint Compatibility DeepInfra-specific endpoints POST /chat/completions at https://api.fikraapi.co.ke/v1
Payment/Access DeepInfra billing and account management Fikra dashboard, API keys, token-credit wallet, and Paystack billing (M-Pesa and cards accepted)
Model Naming DeepInfra model identifiers Fikra aliases (e.g., fikra-flash, fikra-pro-20b)

Python Example Using OpenAI SDK

You can use the standard OpenAI Python SDK to interact with Fikra API by specifying the Fikra base URL and API key. Below is an example using the fikra-flash model.

import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.fikraapi.co.ke/v1",
    api_key=os.getenv("FIKRA_API_KEY")
)

completion = client.chat.completions.create(
    model="fikra-flash",
    messages=[
        {"role": "user", "content": "Hello, Fikra!"}
    ]
)

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

When Fikra API is a Fit

Fikra API may be a suitable choice if: - You prefer an OpenAI-compatible interface for chat completions. - You are based in or have access to Kenyan payment methods (M-Pesa and cards via Paystack). - You want to use Fikra-specific model aliases such as fikra-flash, fikra-fast-8b, fikra-pro-20b, or fikra-pro-120b. - You require streaming support via Server-Sent Events (stream: true).

Verify Before Production

Before deploying Fikra API in a production environment, please: 1. Check the model registry in the Fikra dashboard to confirm the availability and status of specific model aliases. 2. Review rate limits: Unverified accounts are limited to 30 RPM, while trusted accounts are limited to 100 RPM. 3. Test authentication: Ensure your FIKRA_API_KEY is correctly configured and active. 4. Validate streaming behavior: If using stream: true, test Server-Sent Events handling in your application. 5. Confirm billing setup: Verify that your token-credit wallet and Paystack billing integration are functioning as expected.

Note: Fikra API does not offer SLAs, uptime guarantees, or support-response guarantees. Always test thoroughly in a staging environment before production deployment.


JM
// The Founder

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.

usagestatusdashboard