Fikra API solutions · all how-tos

Batch 1,000 Chat Completions Without Hitting Rate Limits

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 can send chat completion requests to https://api.fikraapi.co.ke/v1/chat/completions using the OpenAI SDK. Rate limits are 30 requests/min for unverified accounts and 100 requests/min for trusted accounts. To batch 1,000 requests, throttle your client to stay under your current limit.

Prerequisites

Step-by-step

  1. Set your API key:

bash export FIKRA_API_KEY=your_api_key_here

  1. Create a client with the Fikra API base URL:

```python from openai import OpenAI import os import time

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

  1. Choose a model. For example:

python MODEL = "deepseek-v4-flash-0731"

  1. Loop over your 1,000 payloads and send one request at a time. Sleep between requests to stay within the rate limit:

```python messages_list = [...] # your 1,000 chat message lists

responses = [] for messages in messages_list: response = client.chat.completions.create( model=MODEL, messages=messages, ) responses.append(response.choices[0].message.content) time.sleep(2) # for 30 req/min; use 0.6 if your account is trusted ```

Use time.sleep(2) to stay under 30 requests/min, or time.sleep(0.6) if your account is trusted and you can use 100 requests/min.

  1. Handle each response as needed. The response format is OpenAI-style.

Verify it works

Costs

Pricing is in USD per 1M tokens.

Model Input (USD/1M tokens) Output (USD/1M tokens)
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

Common errors

usagestatusdashboard