# Fikra API — full agent documentation > Fikra API is an OpenAI-compatible inference API for open-weight models. > Pay per call with x402 (USDC on Base) or with a prepaid API key. M-Pesa and > cards are supported for top-ups. Operated by Lacesse Ventures. ## Quick start (API key) 1. Create an account at https://fikraapi.co.ke/account and generate a key in the dashboard. 2. Call the standard OpenAI chat-completions shape below. ```http POST https://api.fikraapi.co.ke/v1/chat/completions Authorization: Bearer Content-Type: application/json {"model": "deepseek-v4.1-flash", "messages": [{"role": "user", "content": "Hello"}]} ``` DeepSeek-line rates start at $0.045/M input. ## Quick start (agent-assisted account for a human) An AI agent can create a provisional account for a human, use the API with a 6-hour delegated token, and top up. Agent-created accounts get no signup credit. 1. `POST https://api.fikraapi.co.ke/v1/agents/accounts` with `{"email": "human@example.com", "agent_name": "your-agent"}`. 2. Use the returned 6-hour `token` as `Authorization: Bearer ` for `/v1/agents/*`. 3. Create an API key with `POST https://api.fikraapi.co.ke/v1/agents/keys`, then call `/v1/chat/completions` with it. 4. Top up with `POST https://api.fikraapi.co.ke/v1/agents/topup`. The default returns a Paystack checkout URL. `auto: true` charges a saved card up to $100/day after the human claims the account. 5. Give the human the returned `claim_url`. They set a password and get a full account. Docs: https://fikraapi.co.ke/for-agents. JSON: https://fikraapi.co.ke/agents.json. ## Quick start (x402, no account) 1. Call `POST https://api.fikraapi.co.ke/v1/agent/chat/completions` with any OpenAI-style body. 2. Receive HTTP 402 with a `PAYMENT-REQUIRED` header (base64 JSON price quote). 3. Sign the payment with any x402 client and retry adding the `PAYMENT-SIGNATURE` header. ## Pricing Per-token, published per model, deducted from a prepaid wallet in real time. No subscription. ## Chat models | model | context | input $/1M | output $/1M | notes | |---|---|---|---|---| | `kimi-k3` | 1,048,576 | 2.1 | 10.5 | | | `qwen3.8-27b` | 1,001,536 | 0.045 | 0.35 | Fast 27B-class multimodal model with automatic prompt caching. Pay $0.10/M on ca | | `deepseek-v4-flash-0731` | 1,048,576 | 0.045 | 0.17 | | | `deepseek-v4.1-flash` | 1,048,576 | 0.05 | 0.11 | | | `deepseek-v4.1-flash-1017` | 1,048,576 | 0.05 | 0.11 | The latest DeepSeek V4.1 Flash update (Oct 17 build): better reasoning, coding, | | `fikra-free-deepseek` | 1,048,576 | 0.045 | 0.09 | Legacy alias of the DeepSeek V4.1 Flash line (1M context). Bills the published D | | `gemini-4-argon` | 1,048,576 | 2.5 | 12.0 | | | `glm-5.2` | 1,048,576 | 0.75 | 1.65 | Z.ai GLM-5.2 on a 1M context: strong coding and reasoning at a lower price than | | `glm-5.3` | 1,048,576 | 1.05 | 3.35 | Z.ai flagship GLM-5.3: large-scale reasoning for complex software engineering an | | `glm-5.3-flash` | 327,680 | 0.155 | 0.49 | | | `mimo-v2.6-pro` | 1,048,576 | 0.5 | 1.0 | Xiaomi MiMo-V2.6-Pro: the top-scoring open-weight model on the Artificial Analys | | `nvidia-nemotron-3.5-super-vl` | 1,048,576 | 0.5 | 1.25 | | | `step-5-preview` | 1,048,576 | 1.25 | 3.3 | | ## Utility models (dedicated endpoints) - `fikra-stt` — $0.001 per minute. Transcribe supported audio into text via the /v1/audio/transcriptions endpoint. - `minimax-h3` — $0.5 per generation. Text-to-video and image-to-video generation. 4-15 second clips, 1080p, first-frame image support. Bi - `fikra-image` — $0.01 per generation. Text-to-image generation in the OpenAI Images API shape. Billed per finished image. - `fikra-tts` — $25.0 per 1m characters. Generate natural speech from text via the /v1/audio/speech endpoint. - `fikra-embed` — $0.05 per 1m tokens. Generate embeddings for semantic search, retrieval and RAG via the /v1/embeddings endpoint. ## Endpoints reference - `POST https://api.fikraapi.co.ke/v1/chat/completions` — standard OpenAI-compatible chat (streaming supported) - Multimodal input parts: an `image_url` part (inline base64 data URI) and an `input_audio` part (base64, transcribed server-side at $0.001/min) on every chat model. - Response caching: on by default for temperature-0 requests (5-minute window, per-account keys). Opt out with `"cache": false` or header `X-Fikra-Cache: no-cache`. Every response carries `X-Fikra-Cache: hit|miss`. Cache hits are not billed. - Extended params (`reasoning_effort`, `enable_thinking`, `top_k`, `min_p`, `logprobs`, `top_logprobs`) pass through on models whose upstream accepts them. - `POST https://api.fikraapi.co.ke/v1/agent/chat/completions` — agent chat (x402 or API key, non-streaming) - `POST https://api.fikraapi.co.ke/v1/agent/quote` — pre-flight price quote - `POST https://api.fikraapi.co.ke/v1/agent/embeddings` — embeddings (x402 or API key) - `POST https://api.fikraapi.co.ke/v1/embeddings` — embeddings (API key) - `POST https://api.fikraapi.co.ke/v1/audio/transcriptions` / `POST https://api.fikraapi.co.ke/v1/audio/speech` — STT / TTS - `POST https://api.fikraapi.co.ke/v1/mcp` — MCP server (fikra_chat paid, fikra_list_models free, fikra_quote paid) - `POST https://api.fikraapi.co.ke/v1/a2a` — A2A message/send - `GET https://api.fikraapi.co.ke/v1/models` — live model catalog JSON ## Rate limits (API-key accounts) - Unpaid: 30 req/min, 300 req/day, 100k tokens/min, 1M tokens/day. - Paid: 3,000 req/min, 250k req/day, no token ceilings (TPM/TPD uncapped). - 429 responses include `Retry-After` and `X-RateLimit-Reset`. ## Errors Standard OpenAI error shape: `{ "error": {"message": "...", "type": "...", "code": "..."}}`. 402 = payment required (x402). 429 = rate limit. 502 = engine temporarily unavailable (safe to retry). ## Benchmarks Fikra publishes its own 500-task evaluation suite (Fikra Eval 500) results for every onboarded model at https://fikraapi.co.ke/benchmark (per-model reports at https://fikraapi.co.ke/benchmark/). Latest scores (refreshed live): | model | Fikra Eval 500 / 100 | avg latency | report | |---|---|---|---| | `deepseek-v4.1-flash` | 74.8 | 26657 ms | https://fikraapi.co.ke/benchmark/deepseek-v4.1-flash | | `step-5-preview` | 8.2 | 546187 ms | https://fikraapi.co.ke/benchmark/step-5-preview | | `glm-5.3-flash` | 80.2 | 18890 ms | https://fikraapi.co.ke/benchmark/glm-5.3-flash | ## Cost estimation - Interactive calculator: https://fikraapi.co.ke/tools/llm-cost-calculator - Machine-readable pricing: https://fikraapi.co.ke/pricing.md - Pre-flight quote endpoint: POST https://api.fikraapi.co.ke/v1/agent/quote ## Traffic rules & contact - Crawler/agent manifest: https://fikraapi.co.ke/.well-known/traffic-rules - Platform status/uptime: https://fikraapi.co.ke/usage.json - Support: vivian@fikraapi.co.ke