Skip to content

Configure OpenCode with your idia key

This page explains, step by step, how to connect OpenCode to idia, at the address https://api.idiacode.com/v1, on a Linux or macOS machine where OpenCode has no configuration yet. The model used is nous, and session titles and summaries also go through nous.

1. Before you start

  • An idiacode account with a verified email address and its idia key, obtained from the API keys section of the console, without a subscription: the Free offer is enough to get started.
  • OpenCode 1.x installed according to its official documentation. Version 2, still in beta, is not covered by this page.

2. Write the configuration

Create the file ~/.config/opencode/opencode.json with the following content:

{
  "enabled_providers": [
    "idia"
  ],
  "model": "idia/nous",
  "small_model": "idia/nous",
  "share": "disabled",
  "autoupdate": false,
  "provider": {
    "idia": {
      "name": "idia",
      "env": [
        "IDIACODE_API_KEY"
      ],
      "options": {
        "baseURL": "https://api.idiacode.com/v1"
      },
      "models": {
        "nous": {
          "name": "Nous",
          "tool_call": true,
          "limit": {
            "context": 1048576,
            "output": 16384
          }
        }
      }
    }
  }
}

This file is OpenCode's global configuration. An opencode.json file placed in a project is merged with it and takes precedence in case of conflict: it can choose another model or another provider. Check it in the folders where you work.

3. Give your key to OpenCode

The key is never written in a shared file and is never committed. Two ways:

  • Main way: an environment variable, declared in your shell profile (for example ~/.bashrc or ~/.zshrc), then a new terminal:
    export IDIACODE_API_KEY="paste-your-key-here"
  • Other way: in OpenCode, the /connect command, choice “Other”, identifier idia, then paste the key. OpenCode keeps it on your machine, in ~/.local/share/opencode/auth.json, a file specific to your user account.

4. Check

The list of models must contain only one model:

opencode models

It shows idia/nous, and nothing else. Then send a first message, here or in a session of the OpenCode interface:

opencode run "Hello"

idia replies. If the key is refused, check your key in the API keys section of the console: a replaced key no longer works.

5. What this configuration guarantees, and what it does not cover

Guaranteed by the configuration:

  • every model request, session titles and summaries included, goes to api.idiacode.com only (enabled_providers, model, small_model);
  • session sharing is turned off;
  • update checks are turned off: update OpenCode yourself.

Flagged, and can be turned off with an environment variable:

  • the model catalogue downloaded by OpenCode at startup: OPENCODE_DISABLE_MODELS_FETCH=1;
  • the download of language servers: OPENCODE_DISABLE_LSP_DOWNLOAD=1.

Flagged, outside this configuration:

  • the installation of OpenCode itself;
  • the reading of web pages by the agent, when it decides to;
  • the MCP servers and plugins you add yourself.

6. When a limit of your offer is reached

Your offer, Free included, has a usage limit per 5-hour session and a weekly limit, described on the pricing page, as well as a monthly usage limit.

When one of them is reached, idia refuses the request, and OpenCode immediately shows its message instead of the response, without retrying. Nothing needs to be done before the time given.

The message is in French, as in the examples below, quoted as they appear.

The message names the limit reached and gives the time at which you can resume. If several limits are reached, it names the one that lifts last, that is, the one at which you will actually be able to resume. For example:

  • La limite de session de 5 heures de votre offre est atteinte. Vous pourrez reprendre le 21 octobre 2026 à 15:00 UTC.
  • La limite hebdomadaire de votre offre est atteinte. Vous pourrez reprendre le 26 octobre 2026 à 00:00 UTC.
  • La limite d'usage de votre offre est atteinte. Elle sera réinitialisée le 1er novembre 2026 à 00:00 UTC.

The dates above are only examples. The time is given in UTC (Coordinated Universal Time): in France, add one hour in winter, two in summer.

Right after the announced time, the limit can take up to about two minutes to lift. The message then says that it is being reset, for example:

  • La limite de session de 5 heures de votre offre est atteinte. Elle est en cours de réinitialisation : réessayez dans une minute.