OpenCode reads providers from opencode.json. A custom OpenAI-compatible provider needs the npm package, baseURL and model map.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"fikra": {
"npm": "@ai-sdk/openai-compatible",
"name": "Fikra API",
"options": { "baseURL": "https://api.fikraapi.co.ke/v1" },
"models": { "deepseek-v4.1-flash-1017": { "name": "DeepSeek V4.1 Flash 1017" } }
}
}
}
Ask OpenCode to explain the repo structure.
Default model: deepseek-v4.1-flash-1017. Prices come from the live catalog.
| Input | $0.1875 / 1M |
| Cached input | $0.0075 / 1M |
| Output | $0.75 / 1M |
Repeated prompt prefixes are billed at the cached rate. Cached input can never cost more than fresh input.
While the window is open, model deepseek-v4-1-flash-economy-free is free. Check live availability.
The key is missing, revoked, or has a leading space. Paste it again from the dashboard and use the fk_live_ value.
The base URL usually has an extra /chat/completions. Use exactly https://api.fikraapi.co.ke/v1.
The model ID is case sensitive. Copy it from /models or the snippet on the dashboard.
You hit the account rate limit. Free accounts allow 30 requests per minute and 300 per day. Any top-up raises the limits.
Source used for this guide: https://opencode.ai/docs/providers/. Prices, limits and model IDs are as of 2026-11-14 and read from the live catalog. Operated by Lacesse Ventures. No contractual SLA on the self-serve plan; support at /support.
More guides: all setup guides. Measured reliability: public stats. Prices: pricing. Free model: free DeepSeek API. Status: /status.