Pi

Point Pi at the gateway with a models.json entry and an environment variable.

Setup

Point Pi at Tium

You need the base URL https://api.tium.ai/v1 and an API key from your dashboard. Keys are shown once at creation.

  1. 1.Add the model to ~/.pi/agent/models.json

    Pi keeps its model list in a JSON file. Add this entry alongside anything already there.

    ~/.pi/agent/models.json
    {
      "providers": {
        "tium": {
          "name": "Tium",
          "baseUrl": "https://api.tium.ai/v1",
          "api": "openai-completions",
          "apiKey": "$TIUM_API_KEY",
          "models": [
            {
              "id": "glm-5.3-flash",
              "name": "GLM-5.3 Flash",
              "input": ["text"],
              "contextWindow": 1000000,
              "maxTokens": 32768
            }
          ]
        }
      }
    }
    Add this to ~/.pi/agent/models.json and export TIUM_API_KEY. Pi resolves the $TIUM_API_KEY reference at runtime, so the key never goes in this file. Then pick the model with /model.
  2. 2.Export your key

    Export TIUM_API_KEY. Pi resolves the $TIUM_API_KEY reference at runtime, so the key never lands in the config file.

  3. 3.Select it with /model

    Start Pi and run /model, then choose GLM-5.3 Flash.

Elsewhere

Other tools

The same base URL and key work anywhere that takes an OpenAI-compatible endpoint.