Client integrationsBeginnersUpdated

Set up OpenCode

This guide uses GPT-6.1 Sol (model ID gpt-6.1-sol). Copy your I Code Easy API key from API keys and choose the Standard endpoint for GPT models in Endpoint selection.

OpenCode

If you opened this guide from a model page, replace the example gpt-6.1-sol with the model ID on the card and use the protocol and endpoint indicated there.

Merge this configuration into your project’s opencode.json or global ~/.config/opencode/opencode.json. Set ICODEEASY_API_KEY in the local environment, then start OpenCode from that environment. Select GPT-6.1 Sol under I Code Easy in the model picker.

json
{
  "$schema": "https://opencode.ai/config.json",
  "model": "icodeeasy/gpt-6.1-sol",
  "providers": {
    "icodeeasy": {
      "name": "I Code Easy",
      "env": [
        "ICODEEASY_API_KEY"
      ],
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": {
        "baseURL": "https://api.icodeeasy.cc/v1"
      },
      "models": {
        "gpt-6.1-sol": {
          "name": "GPT-6.1 Sol"
        }
      }
    }
  }
}

For another model, replace the ID after icodeeasy/ in model and the matching key in providers.icodeeasy.models. Keep the icodeeasy/ prefix. This example uses the OpenCode 2 config format.

Connect through Responses

Keep settings.baseURL and env from the OpenCode 2 example above and set package to @opencode/ai/providers/openai-compatible/responses. Use the same model ID in model and models.

Connect through Messages

Keep settings.baseURL and env from the OpenCode 2 example above and set package to @opencode/ai/providers/anthropic-compatible. Use the same model ID in model and models.

Verify your first request

Send a short text prompt in a new session and confirm the model and status in Usage logs. For a 401, check your key. For model or permission errors, check the model ID and the endpoint listed on the model page. If you have connection issues, try https://jp.icodeeasy.cc or https://sg.icodeeasy.cc with the same path.

Official client documentation