Client integrationsBeginnersUpdated

Set up Pi

The example uses GPT-6.1 Sol (gpt-6.1-sol). Get an I Code Easy API key from API keys. Choose the Standard endpoint for GPT in Endpoint selection.

Installation

Use Node.js 22.19 or later.

bash
npm install -g --ignore-scripts @earendil-works/pi-coding-agent

Pi

This configuration sends requests to /v1/responses over HTTP.

Merge the icodeeasy entry below into providers in ~/.pi/agent/models.json. Keep the $ in apiKey so Pi reads the environment variable.

json
{
  "$schema": "https://pi.dev/schemas/models.schema.json",
  "providers": {
    "icodeeasy": {
      "baseUrl": "https://api.icodeeasy.cc/v1",
      "api": "openai-responses",
      "apiKey": "$ICODEEASY_API_KEY",
      "models": [
        {
          "id": "gpt-6.1-sol",
          "name": "GPT-6.1 Sol"
        }
      ]
    }
  }
}

Set the key in the terminal that launches the client. Replace YOUR_API_KEY with your key.

bash
export ICODEEASY_API_KEY='YOUR_API_KEY'
powershell
$env:ICODEEASY_API_KEY = 'YOUR_API_KEY'

Start a session

Run pi, open /model, and select icodeeasy/gpt-6.1-sol.

Oh My Pi has its own configuration file. See Set up Oh My Pi.

Verify your first request

Send a short text prompt and check the model and request status in Usage logs. For a 401 error, check the key. For a model or permission error, check the model ID and selected endpoint. If the connection is unstable, try https://jp.icodeeasy.cc or https://sg.icodeeasy.cc and keep the /v1 path.

Official client documentation