Skip to content

OpenCode

OpenCode uses one configuration file:

txt
~/.config/opencode/opencode.json

You can also use opencode.jsonc. Create the file manually if it does not exist.

Choose the provider example that matches the group assigned to your CE API key. The base URL and API key under API Keys -> Use Key take precedence over the placeholders below.

OpenAI

json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "openai": {
      "options": {
        "baseURL": "https://codex-easy.ai/v1",
        "apiKey": "<your-ce-api-key>"
      },
      "models": {
        "gpt-5.6-sol": {
          "name": "GPT-5.6 Sol",
          "limit": {
            "context": 500000,
            "output": 128000
          },
          "options": {
            "store": false
          },
          "variants": {
            "low": {},
            "medium": {},
            "high": {},
            "xhigh": {},
            "max": {},
            "ultra": {}
          }
        },
        "gpt-5.6-terra": {
          "name": "GPT-5.6 Terra",
          "limit": {
            "context": 500000,
            "output": 128000
          },
          "options": {
            "store": false
          },
          "variants": {
            "low": {},
            "medium": {},
            "high": {},
            "xhigh": {},
            "max": {},
            "ultra": {}
          }
        },
        "gpt-5.6-luna": {
          "name": "GPT-5.6 Luna",
          "limit": {
            "context": 500000,
            "output": 128000
          },
          "options": {
            "store": false
          },
          "variants": {
            "low": {},
            "medium": {},
            "high": {},
            "xhigh": {},
            "max": {},
            "ultra": {}
          }
        },
        "gpt-5.5": {
          "name": "GPT-5.5",
          "limit": {
            "context": 400000,
            "output": 128000
          },
          "options": {
            "store": false
          },
          "variants": {
            "low": {},
            "medium": {},
            "high": {},
            "xhigh": {}
          }
        },
        "gpt-5.4": {
          "name": "GPT-5.4",
          "limit": {
            "context": 1050000,
            "output": 128000
          },
          "options": {
            "store": false
          },
          "variants": {
            "low": {},
            "medium": {},
            "high": {},
            "xhigh": {}
          }
        },
        "gpt-5.4-mini": {
          "name": "GPT-5.4 Mini",
          "limit": {
            "context": 400000,
            "output": 128000
          },
          "options": {
            "store": false
          },
          "variants": {
            "low": {},
            "medium": {},
            "high": {},
            "xhigh": {}
          }
        }
      }
    }
  }
}

Anthropic

json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "anthropic": {
      "options": {
        "baseURL": "https://codex-easy.ai/v1",
        "apiKey": "<your-ce-api-key>"
      },
      "npm": "@ai-sdk/anthropic"
    }
  }
}

Gemini

json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "gemini": {
      "options": {
        "baseURL": "https://codex-easy.ai/v1beta",
        "apiKey": "<your-ce-api-key>"
      },
      "npm": "@ai-sdk/google",
      "models": {
        "gemini-3.5-flash": {
          "name": "Gemini 3.5 Flash",
          "limit": {
            "context": 1048576,
            "output": 65536
          },
          "modalities": {
            "input": ["text", "image", "pdf"],
            "output": ["text"]
          }
        },
        "gemini-3.1-pro": {
          "name": "Gemini 3.1 Pro",
          "limit": {
            "context": 1048576,
            "output": 65536
          },
          "modalities": {
            "input": ["text", "image", "pdf"],
            "output": ["text"]
          },
          "options": {
            "thinking": {
              "budgetTokens": 24576,
              "type": "enabled"
            }
          }
        }
      }
    }
  }
}

Grok

json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "grok": {
      "options": {
        "baseURL": "https://codex-easy.ai/v1",
        "apiKey": "<your-ce-api-key>"
      },
      "npm": "@ai-sdk/openai",
      "name": "Grok",
      "models": {
        "grok-4.5": {
          "name": "Grok 4.5",
          "limit": {
            "context": 1000000,
            "output": 128000
          }
        }
      }
    }
  }
}