Use OpenCode with any model via one gateway

OpenCode loads custom providers through the AI SDK's OpenAI-compatible adapter, so the WebikAI gateway drops into opencode.json as one provider block.

Setup

  1. Create an account and copy your wk_live_… key (shown once).
  2. Add the provider to opencode.json:
json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "webik": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "WebikAI",
      "options": {
        "baseURL": "https://gateway.webik.ai/v1",
        "apiKey": "wk_live_..."
      },
      "models": {
        "auto/code": { "name": "WebikAI auto/code" },
        "auto/cheap": { "name": "WebikAI auto/cheap" }
      }
    }
  }
}

Then pick webik/auto/code from OpenCode's model list.

Models to start with

Coding route ranked under your policy
Aggressively minimize cost
Premium frontier route under your policy
Pin an exact model (OpenRouter-style slug)

Receipts and budgets

Every response carries five x-webik-* headers naming the request id, the model and provider that actually served it, the credential used (byok/managed), and whether a fallback fired. Requests stop at your per-key and per-client budget caps — before forwarding, never after.

Full reference: docs · live scores: benchmarks · start free