AIModelsCat

OpenCode in your terminal via AIModelsCat

Write and debug code in natural language from the terminal. OpenCode calls our OpenAI-compatible API — Claude, GPT, DeepSeek and more on one balance, without VPN or foreign subscriptions.

What OpenCode can do

A full coding agent: it reads the repo, edits files, runs commands, and iteratively fixes errors.

  • Code generation

    Creates files and functions from a task description.

  • Debugging

    Finds failure causes and proposes fixes.

  • Refactoring

    Improves structure and readability without changing behavior.

  • MCP and tools

    Connects external tools alongside the filesystem.

Before you start

  1. 1

    AIModelsCat account

    Sign up or sign in on the site.

  2. 2

    Balance

    Top up your wallet — OpenCode requests are billed like regular chats.

  3. 3

    API key

    Open Profile → API and create a key. The secret is shown once.

Install and configure

  1. 1

    Install OpenCode

    Follow the guide on opencode.ai for macOS, Linux, or Windows (WSL).

  2. 2

    Add opencode.json to the project

    Copy the config below into the repo root. baseURL points at our API.

  3. 3

    Authenticate with the key

    In the TUI run /connect, pick aimodelscat (or Other), and paste the amc_… key from your profile. Or: opencode auth login

Ready opencode.json

baseURL: https://aimodelscat.ru/api/v1

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "aimodelscat": {
      "npm": "@ai-sdk/openai-compatible",
      "name": "AIModelsCat",
      "options": {
        "baseURL": "https://aimodelscat.ru/api/v1"
      },
      "models": {
        "solar-mini-4-5": {
          "name": "solar-mini-4-5"
        },
        "deepseek-v4.1-flash-1017": {
          "name": "deepseek-v4.1-flash-1017"
        },
        "claude-sonnet-5-5": {
          "name": "claude-sonnet-5-5"
        },
        "gpt-5.6-sol": {
          "name": "gpt-5.6-sol"
        }
      }
    }
  },
  "model": "aimodelscat/solar-mini-4-5"
}

Do not commit the key. OpenCode stores auth locally after /connect.

Models

The config lists example text models from the catalog. Add catalog ids you need, or call GET /api/v1/models with your API key. Switch in OpenCode with /models.

Text model catalog · Pricing

Example prompts

  • «Add a /health endpoint that returns JSON status»
  • «The test fails with a nil pointer — find and fix it»
  • «Split this service into modules and update imports»

FAQ

Profile → API tab → Create key. The full secret is shown once.

Same as web chat: reserve from balance → model request → settle by usage. Paid models need a positive balance.

No. Traffic goes through AIModelsCat; models work without direct OpenAI/Anthropic subscriptions.

Text models from the AIModelsCat catalog (same ids as web chat). Images and video are not on this API in v1.

Yes. Any OpenAI-compatible client that posts to /v1/chat/completions with Bearer amc_… works.

Ready to start

Sign in, create a key in your profile, and drop the config into your project. You only pay for actual requests.