CheapAI

Documentation

Everything you need to plug CheapAI into your tooling — setup guides for popular agents, API reference, FAQ.

Zed

Editor with a built-in agent

Create an API key on the Keys page and copy it.

Open settings.json (cmd-shift-P → zed: open settings) and add the provider. List only the models you actually use - each one shows up in the picker.

json
{
  "language_models": {
    "openai_compatible": {
      "cheapai": {
        "api_url": "https://cheapai.io/v1",
        "available_models": [
          {
            "name": "claude-opus-4-8",
            "display_name": "Claude Opus 4.8",
            "max_tokens": 200000,
            "max_output_tokens": 32000,
            "capabilities": { "tools": true, "images": true }
          },
          {
            "name": "gpt-5.6-sol",
            "display_name": "GPT-5.6 Sol",
            "max_tokens": 200000,
            "max_output_tokens": 32000,
            "capabilities": { "tools": true, "images": true }
          }
        ]
      }
    }
  }
}

Put the key in the Agent settings UI, or export CHEAPAI_API_KEY in your shell.

bash
export CHEAPAI_API_KEY="<ваш ключ>"
Do not put the key into settings.json - Zed ignores it there and keeps keys in the system keychain. The env var name is derived from the provider id: cheapai → CHEAPAI_API_KEY. Rename the provider and the variable name changes with it.
Model ids must match the catalog exactly - see the list.