Skip to main content

Connecting in OpenCode

  1. Install OpenCode

  2. Create the file opencode.json in the project root and fill it with the contents below

    opencode.json
    {
    "$schema": "https://opencode.ai/config.json",
    "provider": {
    "explyt": {
    "npm": "@ai-sdk/openai-compatible",
    "name": "explyt",
    "options": {
    "baseURL": "https://api.explyt.ai/openai/api"
    },
    "models": {
    "auto": {
    "limit": {
    "context": 372000,
    "output": 32768
    }
    },
    "Anthropic/opus-5": {
    "limit": {
    "context": 465536,
    "output": 65536
    }
    },
    "Anthropic/sonnet-5": {
    "limit": {
    "context": 465536,
    "output": 65536
    }
    },
    "OpenAI/gpt-5.6-sol": {
    "limit": {
    "context": 372000,
    "output": 32768
    }
    }
    }
    }
    }
    }
    • The baseURL field already contains the OpenAI-compatible URL https://api.explyt.ai/openai/api
    • The models block lists the main recommended models. Full list of models: https://api.explyt.ai/openai/api/models
    • To use another model, add it to the models block following the same pattern
  3. Start OpenCode:

    opencode
  4. Type /connect

    OpenCode: the /connect command

  5. Choose explyt (or another name you specified in the config)

    OpenCode: choosing the explyt provider

  6. Enter the API key from your personal account. The key is in the Connect to Explyt block of your personal account, the Copy key button. Details: where to get the URL and key

    OpenCode: entering the API key

Requests from OpenCode spend Explyt subscription minutes the same way as requests from the plugin. The balance is shown in your personal account.

For errors, see Error messages.