MixMedia Sign in
Claude CodeAnthropic

Claude Code with MixMedia: 3 ways to connect

Claude Code talks to https://api.mixmedia.tech exactly like the native Anthropic API: streaming, tools, prompt caching. Pick a way: terminal, VS Code or OpenCode. Pay per token from your MixMedia balance.

Pay with a Russian card, SBP or SberPay — no foreign card, no VPNTop up from $5 (Russian cards, SBP, SberPay; any card in USD). Usage is charged per token from your balance, no subscription.Top up
Before you start

Get an API key

Sign in at mixmedia.tech, open Dashboard → API keys and click “Create key”. The key starts with sk-aim-. It is the same key as for images and video, with one shared balance.

Top up in Dashboard → Balance. No subscription: you pay only for the tokens the model actually used.

Choose how to connect

Option A: Claude Code in the terminal

Step 1 of 4

Install Claude Code

You need Node.js 18+. Same command on Windows, macOS and Linux:

Terminal / PowerShell
npm install -g @anthropic-ai/claude-code

Check: claude --version.

Step 2 of 4

Set the URL and key

Use ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY: the key goes in the Authorization: Bearer header and Claude Code will not ask for an Anthropic login.

macOS / Linux (Bash, Zsh)

current session
export ANTHROPIC_BASE_URL="https://api.mixmedia.tech"
export ANTHROPIC_AUTH_TOKEN="sk-aim-YOUR_KEY"
export ANTHROPIC_MODEL="claude-sonnet-5-5"
export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-5-5"
export ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-5-5"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-5-5"
export ANTHROPIC_SMALL_FAST_MODEL="claude-haiku-5-5"
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
permanent (for Bash use ~/.bashrc instead of ~/.zshrc)
echo 'export ANTHROPIC_BASE_URL="https://api.mixmedia.tech"' >> ~/.zshrc
echo 'export ANTHROPIC_AUTH_TOKEN="sk-aim-YOUR_KEY"' >> ~/.zshrc
echo 'export ANTHROPIC_MODEL="claude-sonnet-5-5"' >> ~/.zshrc
echo 'export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-5-5"' >> ~/.zshrc
echo 'export ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-5-5"' >> ~/.zshrc
echo 'export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-5-5"' >> ~/.zshrc
echo 'export ANTHROPIC_SMALL_FAST_MODEL="claude-haiku-5-5"' >> ~/.zshrc
echo 'export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1' >> ~/.zshrc
source ~/.zshrc

Windows CMD

current window
set ANTHROPIC_BASE_URL=https://api.mixmedia.tech
set ANTHROPIC_AUTH_TOKEN=sk-aim-YOUR_KEY
set ANTHROPIC_MODEL=claude-sonnet-5-5
set ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-5-5
set ANTHROPIC_DEFAULT_SONNET_MODEL=claude-sonnet-5-5
set ANTHROPIC_DEFAULT_HAIKU_MODEL=claude-haiku-5-5
set ANTHROPIC_SMALL_FAST_MODEL=claude-haiku-5-5
set CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1

Windows PowerShell

current session
$env:ANTHROPIC_BASE_URL="https://api.mixmedia.tech"
$env:ANTHROPIC_AUTH_TOKEN="sk-aim-YOUR_KEY"
$env:ANTHROPIC_MODEL="claude-sonnet-5-5"
$env:ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-5-5"
$env:ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-5-5"
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-5-5"
$env:ANTHROPIC_SMALL_FAST_MODEL="claude-haiku-5-5"
$env:CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
permanent (restart the terminal)
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://api.mixmedia.tech", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk-aim-YOUR_KEY", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_MODEL", "claude-sonnet-5-5", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_OPUS_MODEL", "claude-opus-5-5", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_SONNET_MODEL", "claude-sonnet-5-5", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_HAIKU_MODEL", "claude-haiku-5-5", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_SMALL_FAST_MODEL", "claude-haiku-5-5", "User")
[Environment]::SetEnvironmentVariable("CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC", "1", "User")

Instead of variables you can create ~/.claude/settings.json once, as in option B; both the terminal and VS Code read it.

Step 3 of 4

Choose a model

Claude Code's model picker is hardcoded, so without our environment variables it may still list older names such as Opus 4.8 and Sonnet 5. Add ANTHROPIC_MODEL, ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL to settings.json (see option B) so the menu shows Claude Sonnet 5.5, Opus 5.5, Sonnet 5.5 and Haiku 5.5. Fully restart VS Code or the terminal after changing it. If those variables are missing, an older name still works: we route it to the nearest model in the same family and bill that model's price. The default (ANTHROPIC_MODEL) is Claude Sonnet 5.5; switch with /model. Background tasks go to ANTHROPIC_SMALL_FAST_MODEL; Haiku 5.5 is the cheapest there.

ModelIDInput / 1MOutput / 1MCache read / 1M
Claude Opus 5.5claude-opus-5-5$4.16$20.8$0.208
Claude Sonnet 5.5claude-sonnet-5-5$2.08$10.4$0.208
Claude Haiku 5.5claude-haiku-5-5$0.104$0.52$0.0104
Claude Fable 5.2claude-fable-5.2$8.32$41.6$0.208

Prices for Claude Code, Codex, Gemini CLI, OpenCode, Cline and similar coding tools. The same models via a regular API call cost a bit more. Cache-read price depends on the model (see the table). Cache write is 1.25× the input price in the same column. A 1-hour cache write is 2× input for Claude and 2.5× input for GPT. Long context: Claude Haiku 5.5: prompts over 100k tokens — coding $0.52 / $2.6, direct API $0.6 / $3; GPT-6 Astra: prompts over 272k tokens — coding $20.8 / $78, direct API $24 / $90; GPT-6.1 Sol: prompts over 272k tokens — coding $4.16 / $15.6, direct API $4.8 / $18; GPT-6.2 Sol: prompts over 272k tokens — coding $4.16 / $15.6, direct API $4.8 / $18; GPT-6.2 Astra: prompts over 272k tokens — coding $16.64 / $62.4, direct API $19.2 / $72; GPT-5.6: prompts over 272k tokens — coding $8.32 / $31.2, direct API $9.6 / $36.

USD per 1M tokens for Claude Code and similar tools. Cache write costs 1.25× input; cache-read prices are in the table. Claude Code caches most of its context, so long sessions are much cheaper than the input price suggests. Older names such as claude-opus-4-8, claude-sonnet-5 and claude-haiku-4-5 (including the [1m] suffix) are routed to Opus 5.5, Sonnet 5.5 and Haiku 5.5, and you are billed for the model that actually answered.

Step 4 of 4

Run and verify

Terminal
cd your-project
claude

Inside, type /status: Anthropic base URL must show https://api.mixmedia.tech. Usage appears in the Dashboard as one line per session.

Troubleshooting

401 Invalid API key

The key is incomplete or deleted. Create a new one in the Dashboard.

Insufficient balance

Top up: each request checks that the balance covers at least the answer.

Claude Code asks for an Anthropic login

Make sure ANTHROPIC_AUTH_TOKEN is set and ANTHROPIC_API_KEY is not; run claude /logout and restart the terminal.

529 / overloaded

The model is busy; Claude Code retries, or switch models with /model.

Option B: Claude Code extension for VS Code

Step 1 of 5

Install Node.js

If you do not have Node.js yet, download the LTS from nodejs.org or install it with one command:

Windows PowerShell
winget install OpenJS.NodeJS.LTS
macOS / Linux (via nvm)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
. "$HOME/.nvm/nvm.sh"
nvm install --lts
node -v
Step 2 of 5

Install the Claude Code extension

Open VS Code, click Extensions (Ctrl+Shift+X), search for Claude Code by Anthropic and click Install. It installs the same way in Cursor and Windsurf.

Step 3 of 5

Create settings.json

The extension reads the URL and key from settings.json in the .claude folder of your home directory:

SystemPath
Windows%USERPROFILE%\.claude\settings.json
macOS / Linux~/.claude/settings.json

Copy and paste

settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.mixmedia.tech",
    "ANTHROPIC_AUTH_TOKEN": "sk-aim-YOUR_KEY",
    "ANTHROPIC_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5-5",
    "ANTHROPIC_SMALL_FAST_MODEL": "claude-haiku-5-5",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  }
}

Quick, with PowerShell

Windows PowerShell
New-Item -ItemType Directory -Path "$env:USERPROFILE\.claude" -Force | Out-Null
$settings = [ordered]@{
  env = [ordered]@{
    ANTHROPIC_BASE_URL = "https://api.mixmedia.tech"
    ANTHROPIC_AUTH_TOKEN = "sk-aim-YOUR_KEY"
    ANTHROPIC_MODEL = "claude-sonnet-5-5"
    ANTHROPIC_DEFAULT_OPUS_MODEL = "claude-opus-5-5"
    ANTHROPIC_DEFAULT_SONNET_MODEL = "claude-sonnet-5-5"
    ANTHROPIC_DEFAULT_HAIKU_MODEL = "claude-haiku-5-5"
    ANTHROPIC_SMALL_FAST_MODEL = "claude-haiku-5-5"
    CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC = "1"
  }
}
$json = $settings | ConvertTo-Json -Depth 5
[System.IO.File]::WriteAllText("$env:USERPROFILE\.claude\settings.json", $json, (New-Object System.Text.UTF8Encoding($false)))

Quick, macOS / Linux terminal

Bash / Zsh
mkdir -p ~/.claude && cat > ~/.claude/settings.json <<'EOF'
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.mixmedia.tech",
    "ANTHROPIC_AUTH_TOKEN": "sk-aim-YOUR_KEY",
    "ANTHROPIC_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5-5",
    "ANTHROPIC_SMALL_FAST_MODEL": "claude-haiku-5-5",
    "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
  }
}
EOF
Replace sk-aim-YOUR_KEY with your key. If the file already exists, add the env block without removing other settings. No config.json is needed.
Step 4 of 5

If the extension ignores the file

Set the same values as user environment variables and fully restart VS Code:

Windows PowerShell
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://api.mixmedia.tech", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk-aim-YOUR_KEY", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_MODEL", "claude-sonnet-5-5", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_OPUS_MODEL", "claude-opus-5-5", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_SONNET_MODEL", "claude-sonnet-5-5", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_DEFAULT_HAIKU_MODEL", "claude-haiku-5-5", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_SMALL_FAST_MODEL", "claude-haiku-5-5", "User")
[Environment]::SetEnvironmentVariable("CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC", "1", "User")
macOS / Linux
echo 'export ANTHROPIC_BASE_URL="https://api.mixmedia.tech"' >> ~/.zshrc
echo 'export ANTHROPIC_AUTH_TOKEN="sk-aim-YOUR_KEY"' >> ~/.zshrc
Step 5 of 5

Launch and verify

Restart VS Code and click the Claude Code icon in the sidebar or the top-right of the editor. Type /status in its chat: it must show https://api.mixmedia.tech.

Troubleshooting

401 Invalid API key

The key is incomplete or deleted. Create a new one in the Dashboard.

Insufficient balance

Top up: each request checks that the balance covers at least the answer.

Claude Code asks for an Anthropic login

Make sure ANTHROPIC_AUTH_TOKEN is set and ANTHROPIC_API_KEY is not; run claude /logout and restart the terminal.

529 / overloaded

The model is busy; Claude Code retries, or switch models with /model.

Option C: Claude in OpenCode

Step 1 of 4

Install OpenCode

OpenCode comes as a terminal app, a VS Code extension and a desktop app. All three read the same config file. The terminal version needs Node.js 18+:

Terminal / PowerShell
npm install -g opencode-ai

VS Code extension: Ctrl+Shift+X → search “opencode” → Install. Check: opencode --version.

Step 2 of 4

Create the config file

SystemPath
Windows%USERPROFILE%\.config\opencode\opencode.json
macOS / Linux~/.config/opencode/opencode.json

Create the folder if it does not exist; OpenCode does not create the file itself:

macOS / Linux
mkdir -p ~/.config/opencode
Windows PowerShell
New-Item -ItemType Directory -Force "$env:USERPROFILE\.config\opencode" | Out-Null

The exact path on your machine: opencode debug paths, line config.

Step 3 of 4

Paste the settings

OpenCode’s built-in Anthropic provider points to our URL. Paste into opencode.json:

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "anthropic": {
      "options": {
        "baseURL": "https://api.mixmedia.tech/v1",
        "apiKey": "sk-aim-YOUR_KEY"
      },
      "models": {
        "claude-sonnet-5-5": { "name": "Claude Sonnet 5.5 (MixMedia)" },
        "claude-opus-5-5": { "name": "Claude Opus 5.5 (MixMedia)" },
        "claude-haiku-5-5": { "name": "Claude Haiku 5.5 (MixMedia)" }
      }
    }
  }
}
Replace sk-aim-YOUR_KEY with your key. The same key works for GPT and Gemini; the GPT block is in the Codex guide.
Step 4 of 4

Launch and pick a model

Terminal
cd your-project
opencode

In VS Code restart the editor and open OpenCode in the left sidebar. The desktop app picks up the same opencode.json.

One-shot: opencode run -m anthropic/claude-sonnet-5-5 "fix the bug in calc.py"

CommandWhat it does
/modelsswitch model (look for “MixMedia”)
@файлattach a file to the prompt
/helpall commands
/exitquit

Troubleshooting

MixMedia models are missing in /models

Check the path from opencode debug paths and that the file is valid JSON (no trailing comma).

401

The key in apiKey is incomplete. Copy it again from the Dashboard.

FAQ

Can I use Claude Code from Russia?

Yes. Point Claude Code at https://api.mixmedia.tech with your MixMedia key. It works without a VPN and without an Anthropic, OpenAI or Google account.

How do I pay from Russia?

Top up your MixMedia balance with a Russian bank card, SBP or SberPay (from $5). No foreign card needed; tokens are charged from the balance.

Do I need a VPN?

No. api.mixmedia.tech is reachable from Russia directly, both for the CLI and for the VS Code extensions.

How much does it cost?

For coding tools such as Claude Code, from $0.104 per 1M input tokens depending on the model; cache-read prices are in the table on this page. A regular API call (not from a coding tool) costs a bit more. Full list: api.mixmedia.tech/v1/models.

How is it different from the official API?

Same models and the same API format, so the tools work unchanged. The difference is payment and access: Russian cards and SBP, no VPN, one key for Claude, GPT and Gemini. Prices are per token and may be higher than the official list price.

How do I get a key?

Sign in at mixmedia.tech, open Dashboard → API keys, click “Create key” and top up the balance.

Other tools

Questions? Telegram @mixmedia_robot.